TrustCore SDK NanoCrypto API reference  version 7.0
srp.h
Go to the documentation of this file.
1 /*
2  * srp.h
3  *
4  * Secure Remote Protocol
5  *
6  * Copyright 2019-2024 DigiCert, Inc. All Rights Reserved.
7  * Proprietary and Confidential Material.
8  *
9  */
10 
23 /*------------------------------------------------------------------*/
24 
25 #ifndef __SRP_HEADER__
26 #define __SRP_HEADER__
27 
28 #ifndef __MOCANA_MIN_SRP_BITS__
29 #define __MOCANA_MIN_SRP_BITS__ (2048)
30 #endif
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
55 MOC_EXTERN MSTATUS SRP_getGroupParameters( ubyte4 bitNum,
56  vlong** modulus,
57  vlong** generator,
58  vlong** k);
59 
82 MOC_EXTERN MSTATUS SRP_getGroupParameters2( ubyte4 bitNum,
83  const ubyte** modulus,
84  sbyte4* modulusLen,
85  const ubyte** generator,
86  sbyte4* generatorLen,
87  const ubyte** k);
88 
113 MOC_EXTERN MSTATUS SRP_computeVerifier(MOC_ASYM(hwAccelDescr hwAccelCtx)
114  const ubyte* salt, ubyte4 saltLen,
115  const ubyte* uname, ubyte4 unameLen,
116  const ubyte* pw, ubyte4 pwLen,
117  ubyte4 bitNum,
118  ubyte** verifier, ubyte4* verifierLen);
119 
120 #ifdef __cplusplus
121 }
122 #endif
123 
124 #endif /* __SRP_HEADER__ */
MOC_EXTERN MSTATUS SRP_getGroupParameters2(ubyte4 bitNum, const ubyte **modulus, sbyte4 *modulusLen, const ubyte **generator, sbyte4 *generatorLen, const ubyte **k)
Gets the SRP Group parameters in Big Endian byte array form.
MOC_EXTERN MSTATUS SRP_computeVerifier(MOC_ASYM(hwAccelDescr hwAccelCtx) const ubyte *salt, ubyte4 saltLen, const ubyte *uname, ubyte4 unameLen, const ubyte *pw, ubyte4 pwLen, ubyte4 bitNum, ubyte **verifier, ubyte4 *verifierLen)
Computes the verifier for a user.
MOC_EXTERN MSTATUS SRP_getGroupParameters(ubyte4 bitNum, vlong **modulus, vlong **generator, vlong **k)
Gets the SRP Group parameters.