class SecureRemotePassword::Verifier
- SecureRemotePassword::Verifier
- Reference
- Object
Included Modules
Defined in:
secure-remote-password/verifier.crConstructors
Instance Method Summary
- #algorithm : Algorithm
- #arg_g : BigInt
- #arg_k : BigInt
- #arg_N : BigInt
-
#generate_user_verifier(username : String, password : String, salt = random_hex(@salt_size))
Initial user creation for the persistance layer.
-
#get_challenge_and_proof(username : String, verifier : String, salt : String, client_A : String, arg_b : BigInt = random_big_int(32))
Authentication phase 1 - create challenge.
-
#verify_session(proof : Proof, client_m : String)
returns H_AMK on success, None on failure User -> Host: M = H(H(N) xor H(g), H(I), s, A, B, K) Host -> User: H(A, M, K)
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) : BigIntcalculate_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(group : Int32, algorithm : Algorithm = Algorithm::SHA512, salt_size : Int32 | Nil = nil)
#
Instance Method Detail
def generate_user_verifier(username : String, password : String, salt = random_hex(@salt_size))
#
Initial user creation for the persistance layer.
Not part of the authentication process. Salt should only be provided for testing
Returns {
def get_challenge_and_proof(username : String, verifier : String, salt : String, client_A : String, arg_b : BigInt = random_big_int(32))
#
Authentication phase 1 - create challenge. Returns Hash with challenge for client and proof to be stored on server. Parameters should be given in hex.
returns H_AMK on success, None on failure User -> Host: M = H(H(N) xor H(g), H(I), s, A, B, K) Host -> User: H(A, M, K)