• Breaking News

    Monday, June 4, 2018

    Cryptography Did I find a solution to prime factorization?

    Cryptography Did I find a solution to prime factorization?


    Did I find a solution to prime factorization?

    Posted: 03 Jun 2018 07:33 PM PDT

    Implementing HMAC

    Posted: 03 Jun 2018 08:02 AM PDT

    Been trying to implement HMAC for fun in code. I've been following the formula H( k xor opad, H(k xor ipad || m)) where key is 64 random bytes, opad=0x5c * 64 and ipad=0x36 * 64 (I'm using SHA1 so the block size is 64). However I keep getting the wrong result and I'm guessing it has something to do with the way I am xor'ing. I set the loop as

    for (int i=0; i<key.length; i++){

    key[i]=(key[i] ^ (char)(ipad % 256)); key2[i]=(key2[i] ^ (char)(opad % 256)); // where key2 is initially just a copy of key 

    }

    Is there anything I'm doing wrong? Thank you

    submitted by /u/mister_broccoli
    [link] [comments]

    No comments:

    Post a Comment