M
mirandacascade
I am attempting to implement a process, and I'm pretty sure that a
major roadblock is that I do not understand the nomenclature. The
specs indicate that the goal is to calculate a message digest using an
SHA-256 algorithm. There are 2 examples included with the specs. The
label on the 2 examples are: 'HMAC samples'. In both examples, the
message on which the digest is to be calculated is (the 33 chars within
the quotes):
'This is a test of VISION services'
In the first example, the value labeled 'Shared key' is the 44
characters within the quotes:
'6lfg2JWdrIR4qkejML0e3YtN4XevHvqowDCDu6XQEFc='
and the value labeled 'Base64 Message Hash' is the 44 characters within
the quotes:
'KF7GkfXkgXFNOgeRud58Oqx2equmKACAwzqQHZnZx9A='
In the second example, the value labeled 'Shared key' is the 44
characters within the quotes:
'jcOv3OBKVNBT8Zk+ZFacrDYNsKlm3D8TGGJyXti//p4='
and the value labeled 'Base64 Message Hash' is the 44 characters within
the quotes:
'XhqneGN0x5I8JVvatXO9z0EBQRre3svFVc+q2lLE3Ik='
My interpretation of the first example is this: when you use an SHA-256
algorithm to calculate a message digest on the message 'This is a test
of VISION services' where the key is
'6lfg2JWdrIR4qkejML0e3YtN4XevHvqowDCDu6XQEFc=', the result should be:
'KF7GkfXkgXFNOgeRud58Oqx2equmKACAwzqQHZnZx9A=' .
Operating system: Win XP
Version of Python: 2.4 (with PyCrypto package installed)
Interactive window of Pythonwin displays how I thought one might
implement the process.
I was hoping that samp1Hash and samp2Hash would be the same as the
values labled 'Base64 Message Has' in the examples...they are not the
same.
My questions are:
1) Given the terminology identified above, do you think my
interpreation of the first example is accurate? If not, what is a more
accurate interpretation?
2) If the interpretation of the first example is on target, do you see
anything above in the use of the SHA256, HMAC and base64
classes/methods that indicates that I did not correctly implement the
process?
Thank you.
major roadblock is that I do not understand the nomenclature. The
specs indicate that the goal is to calculate a message digest using an
SHA-256 algorithm. There are 2 examples included with the specs. The
label on the 2 examples are: 'HMAC samples'. In both examples, the
message on which the digest is to be calculated is (the 33 chars within
the quotes):
'This is a test of VISION services'
In the first example, the value labeled 'Shared key' is the 44
characters within the quotes:
'6lfg2JWdrIR4qkejML0e3YtN4XevHvqowDCDu6XQEFc='
and the value labeled 'Base64 Message Hash' is the 44 characters within
the quotes:
'KF7GkfXkgXFNOgeRud58Oqx2equmKACAwzqQHZnZx9A='
In the second example, the value labeled 'Shared key' is the 44
characters within the quotes:
'jcOv3OBKVNBT8Zk+ZFacrDYNsKlm3D8TGGJyXti//p4='
and the value labeled 'Base64 Message Hash' is the 44 characters within
the quotes:
'XhqneGN0x5I8JVvatXO9z0EBQRre3svFVc+q2lLE3Ik='
My interpretation of the first example is this: when you use an SHA-256
algorithm to calculate a message digest on the message 'This is a test
of VISION services' where the key is
'6lfg2JWdrIR4qkejML0e3YtN4XevHvqowDCDu6XQEFc=', the result should be:
'KF7GkfXkgXFNOgeRud58Oqx2equmKACAwzqQHZnZx9A=' .
Operating system: Win XP
Version of Python: 2.4 (with PyCrypto package installed)
Interactive window of Pythonwin displays how I thought one might
implement the process.
I was hoping that samp1Hash and samp2Hash would be the same as the
values labled 'Base64 Message Has' in the examples...they are not the
same.
My questions are:
1) Given the terminology identified above, do you think my
interpreation of the first example is accurate? If not, what is a more
accurate interpretation?
2) If the interpretation of the first example is on target, do you see
anything above in the use of the SHA256, HMAC and base64
classes/methods that indicates that I did not correctly implement the
process?
Thank you.