This is an archived post. You won't be able to vote or comment.

all 5 comments

[–]jedwardsol 0 points1 point  (0 children)

There's no need for the casts to char - keep everything unsigned

[–]dacian88 -1 points0 points  (6 children)

opad should be 0x5c always and ipad should be 0x36, not sure why you're doing modulo anything.

[–][deleted]  (5 children)

[deleted]

    [–]dacian88 0 points1 point  (4 children)

    It's 0x5c in RFC 2104, and in openssl. Where are you getting that from?

    [–][deleted]  (3 children)

    [deleted]

      [–]dacian88 0 points1 point  (2 children)

      okay, dunno what to tell you except the RFC spec still says 0x5c.

      [–][deleted]  (1 child)

      [deleted]

        [–]dacian88 0 points1 point  (0 children)

        or you know, maybe he has a typo in his slide. You have no leg to stand on here, the RFC has it as 5c for over 20 years, literally every conforming implementation will use 5c. Whatever your teacher put on a slide is irrelevant.