class SecureRemotePassword::Client

Included Modules

Defined in:

secure-remote-password/client.cr

Constructors

Instance Method Summary

Instance methods inherited from module SecureRemotePassword::Helpers

calculate_A(a : BigInt) : BigInt calculate_A, calculate_B(b : BigInt, v : BigInt) : BigInt calculate_B, calculate_client_S(arg_B : BigInt, salt : String, uu : BigInt, a : BigInt) : BigInt calculate_client_S, calculate_h_amk(xaa, xmm, xkk) calculate_h_amk, calculate_k : BigInt calculate_k, calculate_M(username : String, salt : String, xaa, xbb, xkk) : BigInt calculate_M, calculate_server_S(arg_A : BigInt, v : BigInt, u : BigInt, arg_b : BigInt) : BigInt calculate_server_S, calculate_u(arg_A, arg_B) : BigInt calculate_u, calculate_v(username : String, password : String, salt : String) : BigInt
calculate_v(salt : String) : BigInt
calculate_v
, calculate_x(salt : String, username : String = @username, password : String = @password) calculate_x, hash(h : Bytes | String) : BigInt hash, hash_hex(bytes : Bytes) : String
hash_hex(h : String) : String
hash_hex
, hash_string(string : String) : String hash_string, initialization_value(group : Int) : Tuple(BigInt, BigInt) initialization_value, modpow(a : BigInt, n : BigInt, m : BigInt) : BigInt modpow, no_padding_hash(*a) : BigInt no_padding_hash, padded_hash(*parts) : BigInt padded_hash, random_big_int(bytes : Int) : BigInt random_big_int, random_hex(bytes : Int) : String random_hex

Constructor Detail

def self.new(username : String, password : String, group : Int32 = 3072, algorithm : Algorithm = Algorithm::SHA512, arg_a : BigInt = random_big_int(32)) #

[View source]

Instance Method Detail

def algorithm : Algorithm #

[View source]
def arg_a : BigInt #

[View source]
def arg_A : String #

Generated as part of the authentication flow


[View source]
def arg_g : BigInt #

[View source]
def arg_k : BigInt #

[View source]
def arg_N : BigInt #

[View source]
def group : Int32 #

[View source]
def process_challenge(server : Challenge) #

Process initiated authentication challenge. Returns M if authentication is successful, false otherwise. Salt and B should be given in hex.


[View source]
def session_key : String #

[View source]
def start_authentication #

[View source]
def username : String #

[View source]
def verifier : String #

[View source]
def verify(server_h_amk) #

The server returns it's generated H(AMK) and we check it matches ours


[View source]