Re: [WebDNA] HMAC-SHA1 Encryption
This WebDNA talk-list message is from 2013
It keeps the original formatting.
numero = 110298
interpreted = N
texte = SOLVEDThe secret was to tag the seed value as -binary and then to base64 =encrypt the result.echo -n "apple" | openssl dgst -sha1 -hmac "orange" -binary | openssl =enc -base64This creates a signature for Amazon S3On 31/03/2013, at 6:46 PM, Stuart Tremain
wrote:> There is something about base64 in the correct result, I just cant =figure out the correct method.>=20> I added>=20> | openssl -base64=20>=20> to the end but the result is too long.>=20>=20>=20>=20> On 31/03/2013, at 6:42 PM, christophe.billiottet@webdna.us wrote:>=20>> In this case, WebDNA transfers the string to openssl. It does not =interfere with the result. It seems to me your result is correct as sha1 =produces a combination of lower case text and numbers. I suppose you can =find the proper openssl string (or php string as it is easy to guess the =openssl variant) on the internet.>>=20>> - chris>>=20>>=20>>=20>>=20>>=20>>=20>>=20>> On Mar 31, 2013, at 10:17, Stuart Tremain wrote:>>=20>>> Chris>>>=20>>> I tried some experiments, based on some google research.>>>=20>>> echo -n "AmazonS3ListAllMyBuckets2013-03-31T06:48:36.000Z" | openssl =dgst -sha1 -hmac "fexz1rt1sV3SXRGHAGu6w2vXC7z/kEgfRD3TdSI/">>>=20>>> Result is:>>> (stdin)=3D 23e79d1a4f1eded66934c45dd1c3a0677df22cf5>>> but it is incorrect.>>>=20>>> This is the correct result:>>> I+edGk8e3tZpNMRd0cOgZ33yLPU=3D>>>=20>>> Which I got from here:>>>=20>>> http://hash.online-convert.com/sha1-generator>>>=20>>> I can't work out how to get the shorter result with the =3D on the =end>>>=20>>> Stuart>>>=20>>>=20>>>=20>>> On 31/03/2013, at 5:40 PM, christophe.billiottet@webdna.us wrote:>>>=20>>>> Hi Stuart! try [shell]echo -n 'myString' | openssl sha1[/shell]>>>>=20>>>> - chris>>>>=20>>>>=20>>>> On Mar 31, 2013, at 9:11, Stuart Tremain =wrote:>>>>=20>>>>> On a Ubuntu 12.04 server if it makes a difference.>>>>>=20>>>>>=20>>>>> On 31/03/2013, at 5:05 PM, Stuart Tremain =wrote:>>>>>=20>>>>>> For Amazon I need to create a signature which is HMAC-SHA1 =encryption with a seed of a test string.>>>>>>=20>>>>>> How can I do this with WebDNA ?>>>>>>=20>>>>>>=20>>>>>>=20>>>>>> Regards>>>>>>=20>>>>>> Stuart Tremain>>>>>> IDFK Web Developments>>>>>> AUSTRALIA>>>>>> webdna@idfk.com.au>>>>>>=20>>>>>>=20>>>>>>=20>>>>>>=20>>>>>> --------------------------------------------------------->>>>>> This message is sent to you because you are subscribed to>>>>>> the mailing list .>>>>>> To unsubscribe, E-mail to: >>>>>> archives: http://mail.webdna.us/list/talk@webdna.us>>>>>> Bug Reporting: support@webdna.us>>>>>=20>>>>> --------------------------------------------------------->>>>> This message is sent to you because you are subscribed to>>>>> the mailing list .>>>>> To unsubscribe, E-mail to: >>>>> archives: http://mail.webdna.us/list/talk@webdna.us>>>>> Bug Reporting: support@webdna.us>>>>=20>>>> --------------------------------------------------------->>>> This message is sent to you because you are subscribed to>>>> the mailing list .>>>> To unsubscribe, E-mail to: >>>> archives: http://mail.webdna.us/list/talk@webdna.us>>>> Bug Reporting: support@webdna.us>>>=20>>> --------------------------------------------------------- This =message is sent to you because you are subscribed to the mailing list . =To unsubscribe, E-mail to: archives: =http://mail.webdna.us/list/talk@webdna.us Bug Reporting: =support@webdna.us>>=20>> --------------------------------------------------------->> This message is sent to you because you are subscribed to>> the mailing list .>> To unsubscribe, E-mail to: >> archives: http://mail.webdna.us/list/talk@webdna.us>> Bug Reporting: support@webdna.us>=20> ---------------------------------------------------------> This message is sent to you because you are subscribed to> the mailing list .> To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us> Bug Reporting: support@webdna.us
Associated Messages, from the most recent to the oldest:
SOLVEDThe secret was to tag the seed value as -binary and then to base64 =encrypt the result.echo -n "apple" | openssl dgst -sha1 -hmac "orange" -binary | openssl =enc -base64This creates a signature for Amazon S3On 31/03/2013, at 6:46 PM, Stuart Tremain wrote:> There is something about base64 in the correct result, I just cant =figure out the correct method.>=20> I added>=20> | openssl -base64=20>=20> to the end but the result is too long.>=20>=20>=20>=20> On 31/03/2013, at 6:42 PM, christophe.billiottet@webdna.us wrote:>=20>> In this case, WebDNA transfers the string to openssl. It does not =interfere with the result. It seems to me your result is correct as sha1 =produces a combination of lower case text and numbers. I suppose you can =find the proper openssl string (or php string as it is easy to guess the =openssl variant) on the internet.>>=20>> - chris>>=20>>=20>>=20>>=20>>=20>>=20>>=20>> On Mar 31, 2013, at 10:17, Stuart Tremain wrote:>>=20>>> Chris>>>=20>>> I tried some experiments, based on some google research.>>>=20>>> echo -n "AmazonS3ListAllMyBuckets2013-03-31T06:48:36.000Z" | openssl =dgst -sha1 -hmac "fexz1rt1sV3SXRGHAGu6w2vXC7z/kEgfRD3TdSI/">>>=20>>> Result is:>>> (stdin)=3D 23e79d1a4f1eded66934c45dd1c3a0677df22cf5>>> but it is incorrect.>>>=20>>> This is the correct result:>>> I+edGk8e3tZpNMRd0cOgZ33yLPU=3D>>>=20>>> Which I got from here:>>>=20>>> http://hash.online-convert.com/sha1-generator>>>=20>>> I can't work out how to get the shorter result with the =3D on the =end>>>=20>>> Stuart>>>=20>>>=20>>>=20>>> On 31/03/2013, at 5:40 PM, christophe.billiottet@webdna.us wrote:>>>=20>>>> Hi Stuart! try [shell]echo -n 'myString' | openssl sha1[/shell]>>>>=20>>>> - chris>>>>=20>>>>=20>>>> On Mar 31, 2013, at 9:11, Stuart Tremain =wrote:>>>>=20>>>>> On a Ubuntu 12.04 server if it makes a difference.>>>>>=20>>>>>=20>>>>> On 31/03/2013, at 5:05 PM, Stuart Tremain =wrote:>>>>>=20>>>>>> For Amazon I need to create a signature which is HMAC-SHA1 =encryption with a seed of a test string.>>>>>>=20>>>>>> How can I do this with WebDNA ?>>>>>>=20>>>>>>=20>>>>>>=20>>>>>> Regards>>>>>>=20>>>>>> Stuart Tremain>>>>>> IDFK Web Developments>>>>>> AUSTRALIA>>>>>> webdna@idfk.com.au>>>>>>=20>>>>>>=20>>>>>>=20>>>>>>=20>>>>>> --------------------------------------------------------->>>>>> This message is sent to you because you are subscribed to>>>>>> the mailing list .>>>>>> To unsubscribe, E-mail to: >>>>>> archives: http://mail.webdna.us/list/talk@webdna.us>>>>>> Bug Reporting: support@webdna.us>>>>>=20>>>>> --------------------------------------------------------->>>>> This message is sent to you because you are subscribed to>>>>> the mailing list .>>>>> To unsubscribe, E-mail to: >>>>> archives: http://mail.webdna.us/list/talk@webdna.us>>>>> Bug Reporting: support@webdna.us>>>>=20>>>> --------------------------------------------------------->>>> This message is sent to you because you are subscribed to>>>> the mailing list .>>>> To unsubscribe, E-mail to: >>>> archives: http://mail.webdna.us/list/talk@webdna.us>>>> Bug Reporting: support@webdna.us>>>=20>>> --------------------------------------------------------- This =message is sent to you because you are subscribed to the mailing list . =To unsubscribe, E-mail to: archives: =http://mail.webdna.us/list/talk@webdna.us Bug Reporting: =support@webdna.us>>=20>> --------------------------------------------------------->> This message is sent to you because you are subscribed to>> the mailing list .>> To unsubscribe, E-mail to: >> archives: http://mail.webdna.us/list/talk@webdna.us>> Bug Reporting: support@webdna.us>=20> ---------------------------------------------------------> This message is sent to you because you are subscribed to> the mailing list .> To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us> Bug Reporting: support@webdna.us
Stuart Tremain
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
old problem (2001)
I'm tired of all this! (2000)
[WebDNA] [BULK] Securing WebCatalog login (2017)
ACGI processing for .html (1997)
WTB WEBDNA Version 4.5 for OS X (2003)
problems with WebCat-Plugin ()
woops - speed results - right subject (2002)
international time (1997)
2.0 Info (1997)
REPLACE problem (2000)
Need a web cat programmer (2000)
OT: Raid Software on OSX (2003)
Can't load tmpl files (1997)
[WebDNA] Need to convert unix date? (2009)
.htm file tags not showing up (2000)
[Way OT] Workstation Security (2002)
eCommerce Idea Patented? (2002)
[WebDNA] Installing 6.0 onto Server 2008 (2011)
WebCat2b12 - nesting [tags] (1997)
Prevent multiple appends with Reload Button (1997)