Cryptx v0.0.3 Cryptx View Source

The module for working with cryptography. Implements hash-functions and functions for SRP-6a. Don’t forget, this module use NIF, write on C++ with Boost library. So, real implements of this functions you find in c_src folder.

https://en.wikipedia.org/wiki/Secure_Remote_Password_protocol
https://habrahabr.ru/post/121021/

Link to this section Summary

Functions

B are random one time ephemeral keys of the user and host respectively

M = H(H(N) xor H(g), H(I), s, A, B, K)

s = random 512 bit number

u = H(A, B)

v = g ^ x % N

Checking equals number with zero (modulo N)

Calculate sha1-hash for given data

Calculate sha512-hash for given data

Link to this section Functions

B are random one time ephemeral keys of the user and host respectively.

Link to this function compute_K(bigA, v, u, b) View Source

K = H(S)

Link to this function compute_M(bigI, s, bigA, bigB, bigK) View Source

M = H(H(N) xor H(g), H(I), s, A, B, K)

Link to this function compute_R(bigA, bigM, bigK) View Source

R = H(A, M, K)

s = random 512 bit number

u = H(A, B)

v = g ^ x % N

Checking equals number with zero (modulo N)

Calculate sha1-hash for given data

Calculate sha512-hash for given data