Displaying 2 results from an estimated 2 matches for "opad".
Did you mean:
ipad
2010 Oct 19
0
R script help needed for RFC 2104 HMAC algorithm
...############ Test HMAC_MD5 ####################
### B=64
### L=16
#key <- "0x0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b"
##key_len = 16 bytes
data <- "Hi There"
##data_len = 8 bytes
## digest = "0x9294727a3638bb1c13f48ef8158bfc9d"
ipad <- rep("36",64)
opad <- rep("5c",64)
k <- rep("0b", 16)
zeros <- rep("00",48)
K <- c(k, zeros)
K_bin <- cbind(K, sapply( strsplit(K,'') , function(x) paste( bin[x],
collapse='' ) ) )
ipad_bin <- cbind(ipad, sapply( strsplit(ipad,'') , function(x...
2006 Aug 22
1
HMAC-MD5 / HMAC-MD5-context
$ dovecotpw -p testpass
{HMAC-MD5}fe8522268d91e485ccac8f36800e4fa6b10363e2a371cfa61731109b450906cd
I wonder if the prefix 'HMAC-MD5' is the correct notation here.
According to RFC2104 an HMAC is calculated as follows:
H(K XOR opad, H(K XOR ipad, text))
where H is the cryptographic hash function (MD5 in this case).
Therefore the result has to be a 128 bit string, which is obviously
not the case in the above shown example. In addition, the input value
'text' is missing if you only have a password K.
Maybe it would be...