W3C home > Mailing lists > Public > public-webid@w3.org > July 2015

Re: using JS to convert id_rsa.pub to modulus and exponent

From: Melvin Carvalho <melvincarvalho@gmail.com>
Date: Fri, 31 Jul 2015 10:59:54 +0200
Message-ID: <CAKaEYhLBB3mvaW9dhUDpa2o1jzNz6PSZneonMjxtDH_EJRNz0g@mail.gmail.com>
To: public-webid <public-webid@w3.org>
Here's the code I used to convert an openssh key to x.509

https://gist.github.com/melvincarvalho/eee5643eb2a19f210719

usage: <github-nick> [ pubkeyfile ] [ privkeyfile ] [ outputpemfile ]

On 31 July 2015 at 01:03, Melvin Carvalho <melvincarvalho@gmail.com> wrote:

> And this one how to create an x.509 cert in JS
>
> https://gist.github.com/melvincarvalho/d8889b6b9b4beca6dcf5
>
> On 31 July 2015 at 00:47, Melvin Carvalho <melvincarvalho@gmail.com>
> wrote:
>
>>
>>
>> On 31 July 2015 at 00:45, Melvin Carvalho <melvincarvalho@gmail.com>
>> wrote:
>>
>>> https://gist.github.com/melvincarvalho/90c97a8c57e4cac14b5d
>>>
>>> Seems to work for me ...
>>>
>>> For some reason the modulus is 257 long with a leading 00, I'd normally
>>> expect 256 = 2048 bits ... must be some subtle reason for it ...
>>>
>>
>> Sorry, this was primarily meant for the webid list.  Tho, actually may be
>> of some slight interest in payments ... ie use of the digital bazaar crypto
>> library
>>
>>
>
Received on Friday, 31 July 2015 09:06:14 UTC

This archive was generated by hypermail 2.3.1 : Friday, 31 July 2015 09:06:15 UTC