You are not logged in.
Pages: 1
[SOLVED]
I have solved my problem.
BIG thanks to ab for taking time to question my "path" to my goal.
What I've learned is that.
Puttygen does not generate a readable public key part.
Atleast not for me - in this situation.
After I got my hands on the certificate - and password. I could split it into private and public pem files.
These files loads perfectly with mORMot - TRsaPss.
So I've now accomplished my mission to sign data with use of the private key.
And be able to verify the data with use of the public key.
/Bjarne
There is no such thing as a self-signed RSA key, there are X.509 self-signed certificates with a RSA key.
Thanks for explaining that to me
If not, last time I checked, PuttyGen does not generate PEM files, but its own base-64 encoded format.
In Putty I have used menu Conversions - Export OpenSSH Key - but I guess it only exports the private key.
But then again - I have not problems using the private key for signing my data.
/Bjarne
Hi ab.
I have the public key in a file - and the content is this
---- BEGIN SSH2 PUBLIC KEY ----
Comment: ""
AAAAB3NzaC1yc2EAAAADAQABAAABgQCo8VuO+2s3EucZzxqFqXjVJMEz7SJXNDe3
EWFKG8h3L8HZ9ZVssqOcl+f5tpUtw4aTelOScVODCLAWIpekregZeFXCwqEwncf5
Ys9DYHwqRQKCwaj9+PWsvBVhs4lNlZIHBfsvUZhbNhwNbEDLkJLC2eCzHEPrHc7r
w2NhafATQLyXkMUNpGwOJpJrkaxO62ErFV5Tpy1ZcX/oaPW2/lmupCuM+sVeslHO
L7mebAwnm3a2HbchxZ6eGsy9TwV+9V91vbmbi1pHRz6ZAw2+l0oc4jHhorbSaUQl
AevedIYjEad+COhMODULO2SW00owvQJta1IQK23fp4OG1/sRiS5bk+Tizjq8WQxc
rTLaV3wjlwVR6rbzzLGT0P3h8wgR8wEr5nsRq3HrqN0lXeNLOdwOYjpulXTCJBu6
eDCOE9MQf4YCxu6f1tucWnVf/bVruDY653JB0+fQ0xw3qSQfxPp1Of89kcAP7mgk
yCuTSLF2j2nsty59ixT2g+N5OJlzibE=
---- END SSH2 PUBLIC KEY ----
No matter if I use it as a string or load it from file. I cannot get lRsa.LoadFromPublicKeyPem to actually load the key.
Hope this explains it better.
/Bjarne
Hi.
I'm having trouble loading a public key - generated by PuttyGen.
Can anyone guide me in how to succeed?
Here is a few lines of code I've tried.
--- code ---
var
lRsa : TRsaPss;
lPublicKeyPEMString : string;
begin
lRsa := TRsaPss.Create;
try
lPublicKeyPEMString := TFile.ReadAllText('RSA-3072-public-16042024.key');
if lRsa.LoadFromPublicKeyPem(lPublicKeyPEMString) then
begin
<here I need to validate data earlier signed with TRsaPss.Sign - which can load and use the private key>
end;
finally
lRsa.Free;
end;
end;
---- code end ---
But no matter how I try to load the public key - it always returns false.
Do I use TRsaPss wrong?
I've also tried generating self-signed keys from various sites that provides this. But no matter how I try to load the public key - it always fails and returns false.
Any help is much appreciated.
/Bjarne
Pages: 1