Property | Type | Description | |
---|---|---|---|
N1024Bit | NetBigInteger | ||
N1536Bit | NetBigInteger | ||
N2048Bit | NetBigInteger | ||
N3072Bit | NetBigInteger | ||
N4096Bit | NetBigInteger | ||
N6144Bit | NetBigInteger | ||
N8192Bit | NetBigInteger | ||
g1024Bit | NetBigInteger | ||
g1536Bit | NetBigInteger | ||
g2048Bit | NetBigInteger | ||
g3072Bit | NetBigInteger | ||
g4096Bit | NetBigInteger | ||
g6144Bit | NetBigInteger | ||
g8192Bit | NetBigInteger |
Method | Description | |
---|---|---|
CalcA ( NetBigInteger N, NetBigInteger g, NetBigInteger a ) : NetBigInteger |
Returns A.
|
|
CalcB ( NetBigInteger N, NetBigInteger g, NetBigInteger b, NetBigInteger v ) : NetBigInteger |
Calculates B.
|
|
CalcK ( NetBigInteger S ) : Byte[] |
Returns 32 byte array using SHA256 one-way hash of value S. RijndaelManaged, for example can use max key of 32 bytes directly, so this is convienent. If you need more or less entropy, add or subtract bytes as required. Naturally, both sides need to be able to generate the same key bytes. It is recommended to just use the 32 bytes as returned from this method.
|
|
CalcM ( NetBigInteger N, NetBigInteger g, String userName, Byte salt, NetBigInteger A, NetBigInteger B, Byte K ) : Byte[] |
M is client's proof of K.
|
|
CalcM2 ( NetBigInteger A, Byte M, Byte K ) : Byte[] |
M2 is Server's proof of K.
|
|
CalcSClient ( NetBigInteger N, NetBigInteger g, NetBigInteger B, NetBigInteger k, NetBigInteger x, NetBigInteger a, NetBigInteger u ) : NetBigInteger |
Calculates client's S.
|
|
CalcSServer ( NetBigInteger N, NetBigInteger A, NetBigInteger v, NetBigInteger u, NetBigInteger b ) : NetBigInteger |
Calculates server's S.
|
|
CalcV ( NetBigInteger N, NetBigInteger g, NetBigInteger x ) : NetBigInteger |
Calculates V. The password verifier.
|
|
Calck ( NetBigInteger N, NetBigInteger g ) : NetBigInteger |
Calculates k.
|
|
Calcu ( NetBigInteger A, NetBigInteger B ) : NetBigInteger |
Calculates u.
|
|
Calcx ( Byte salt, String userName, String password ) : NetBigInteger |
Calculates x.
|
|
CreateEncryption ( Byte sessionValue ) : NetXtea |
Create XTEA symmetrical encryption object from sessionValue
|
|
GenerateSalt ( ) : Byte[] |
Returns cryptographically random salt bytes.
|
|
GetNandG ( |
Returns N and g as an out parameter based on given keySize.
|
|
Geta ( ) : NetBigInteger |
Returns a - a random private value.
|
|
Getb ( ) : NetBigInteger |
Returns b - a random private value.
|
|
PasswordVerifier ( String userName, String password, Byte salt, NetBigInteger N, NetBigInteger g ) : NetBigInteger |
Host stores v (password verifier) in database.
|
Method | Description | |
---|---|---|
XorArrays ( Byte array1, Byte array2 ) : Byte[] |
XOR two byte arrays together and returns result. Both arrays must be same length and neither can be null. Resulting array will be same size as array1.
|
public static CalcA ( NetBigInteger N, NetBigInteger g, NetBigInteger a ) : NetBigInteger | ||
N | NetBigInteger | |
g | NetBigInteger | |
a | NetBigInteger | |
return | NetBigInteger |
public static CalcB ( NetBigInteger N, NetBigInteger g, NetBigInteger b, NetBigInteger v ) : NetBigInteger | ||
N | NetBigInteger | |
g | NetBigInteger | |
b | NetBigInteger | |
v | NetBigInteger | |
return | NetBigInteger |
public static CalcK ( NetBigInteger S ) : Byte[] | ||
S | NetBigInteger | |
return | Byte[] |
public static CalcM ( NetBigInteger N, NetBigInteger g, String userName, Byte salt, NetBigInteger A, NetBigInteger B, Byte K ) : Byte[] | ||
N | NetBigInteger | |
g | NetBigInteger | |
userName | String | |
salt | Byte | |
A | NetBigInteger | |
B | NetBigInteger | |
K | Byte | |
return | Byte[] |
public static CalcM2 ( NetBigInteger A, Byte M, Byte K ) : Byte[] | ||
A | NetBigInteger | |
M | Byte | |
K | Byte | |
return | Byte[] |
public static CalcSClient ( NetBigInteger N, NetBigInteger g, NetBigInteger B, NetBigInteger k, NetBigInteger x, NetBigInteger a, NetBigInteger u ) : NetBigInteger | ||
N | NetBigInteger | |
g | NetBigInteger | |
B | NetBigInteger | |
k | NetBigInteger | |
x | NetBigInteger | |
a | NetBigInteger | |
u | NetBigInteger | |
return | NetBigInteger |
public static CalcSServer ( NetBigInteger N, NetBigInteger A, NetBigInteger v, NetBigInteger u, NetBigInteger b ) : NetBigInteger | ||
N | NetBigInteger | |
A | NetBigInteger | |
v | NetBigInteger | |
u | NetBigInteger | |
b | NetBigInteger | |
return | NetBigInteger |
public static CalcV ( NetBigInteger N, NetBigInteger g, NetBigInteger x ) : NetBigInteger | ||
N | NetBigInteger | |
g | NetBigInteger | |
x | NetBigInteger | |
return | NetBigInteger |
public static Calck ( NetBigInteger N, NetBigInteger g ) : NetBigInteger | ||
N | NetBigInteger | |
g | NetBigInteger | |
return | NetBigInteger |
public static Calcu ( NetBigInteger A, NetBigInteger B ) : NetBigInteger | ||
A | NetBigInteger | |
B | NetBigInteger | |
return | NetBigInteger |
public static Calcx ( Byte salt, String userName, String password ) : NetBigInteger | ||
salt | Byte | |
userName | String | |
password | String | |
return | NetBigInteger |
public static CreateEncryption ( Byte sessionValue ) : NetXtea | ||
sessionValue | Byte | |
return | NetXtea |
public static GetNandG ( |
||
keySize | ||
g | NetBigInteger | |
return | NetBigInteger |
public static PasswordVerifier ( String userName, String password, Byte salt, NetBigInteger N, NetBigInteger g ) : NetBigInteger | ||
userName | String | |
password | String | |
salt | Byte | |
N | NetBigInteger | |
g | NetBigInteger | |
return | NetBigInteger |