[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.lisp

How to compute the jws signature with SHA256withRSA

vitaliy.kulikov

10/9/2015 4:50:00 PM

Hello, All.
I'm writing a simple implementation of Auth 2.0 for Server to Server Applications for my application using this text https://developers.google.com/identity/protocols/OAuth2Serv....

Unfortunatly, i have no expirience with cryptography, so i'm not sure how to implement this: "Sign the UTF-8 representation of the input using SHA256withRSA".

Can anyone show example code or pseudo-code for this task?
I have RSA key and input string - how to process them?

Thanks!
6 Answers

vitaliy.kulikov

10/16/2015 6:17:00 AM

0

up

William James

10/16/2015 7:36:00 AM

0

vitaliy.kulikov@gmail.com wrote:

> "Sign the UTF-8 representation of the input using SHA256withRSA"

Gauche Scheme:

12.32 rfc.sha - SHA message digest
Module: rfc.sha

This module implements US Secure Hash Algorithm defined in RFC
4634. It provides SHA-1, SHA-224, SHA-256, SHA-384 and SHA-512
(the latter four are sometimes referred as SHA-2
collectively).

The module extends util.digest (See section util.digest -
Message digester framework).

vitaliy.kulikov

10/17/2015 7:53:00 AM

0

?'??????, 16 ?????? 2015 ?. 10:38:37 UTC+3 ?????????? WJ ???????:
> vitaliy...@gmail.com wrote:
>
> > "Sign the UTF-8 representation of the input using SHA256withRSA"
>
> Gauche Scheme:
>

Thank you for reply!
In my case, i need to sign string using CL (sorry for missing this in first message).

Marco Antoniotti

10/19/2015 11:51:00 AM

0

On Saturday, October 17, 2015 at 9:52:50 AM UTC+2, Vitaliy Kulikov wrote:
> ?'??????, 16 ?????? 2015 ?. 10:38:37 UTC+3 ?????????? WJ ???????:
> > vitaliy...@gmail.com wrote:
> >
> > > "Sign the UTF-8 representation of the input using SHA256withRSA"
> >
> > Gauche Scheme:
> >
>
> Thank you for reply!
> In my case, i need to sign string using CL (sorry for missing this in first message).

I believe you thanked the WJ-bot in error. Trolls should not be fed :) Besides, as you noted, the Gauche (umpteen implementation of ) Scheme version is not CL :)

Cheers
--
MA

Carlos

10/19/2015 12:24:00 PM

0

On 09/10/2015 18:50, vitaliy.kulikov@gmail.com wrote:
> Hello, All.
> I'm writing a simple implementation of Auth 2.0 for Server to Server Applications for my application using this text https://developers.google.com/identity/protocols/OAuth2Serv....
>
> Unfortunatly, i have no expirience with cryptography, so i'm not sure how to implement this: "Sign the UTF-8 representation of the input using SHA256withRSA".
>
> Can anyone show example code or pseudo-code for this task?
> I have RSA key and input string - how to process them?

Hi Vitaliy,

I also have no experience with that, but take a look at the Ironclad
library; it probably provides what you need.

http://method-combination.net/lisp...

--


vitaliy.kulikov

10/21/2015 8:43:00 AM

0

?????????, 19 ?????? 2015 ?. 15:24:02 UTC+3 ?????????? Carlos ???????:
> On 09/10/2015 18:50, vitaliy...@gmail.com wrote:
> > Hello, All.
> > I'm writing a simple implementation of Auth 2.0 for Server to Server Applications for my application using this text https://developers.google.com/identity/protocols/OAuth2Serv....
> >
> > Unfortunatly, i have no expirience with cryptography, so i'm not sure how to implement this: "Sign the UTF-8 representation of the input using SHA256withRSA".
> >
> > Can anyone show example code or pseudo-code for this task?
> > I have RSA key and input string - how to process them?
>
> Hi Vitaliy,
>
> I also have no experience with that, but take a look at the Ironclad
> library; it probably provides what you need.
>
> http://method-combination.net/lisp...
>
> --

Hi Carlos,
it is impossible to do with ironclad, unfortunatelly.

As wrote to me Vadim Penzin (he is author of http://penzin.net...)

>>Ironclad does not support formatted RSA keys and signatures, that is those keys and signatures that must be represented in a certain (standard) way.
Ironclad is a wrong tool for the job that you described.
>>
>>I believe that you should use OpenSSLl's command line tools for that.

I tried to write code using openssl, but i still can't generate jwt that would be acceptable by googleapi.