I'm trying to persist public/private keys to our database and having some trouble:
Welcome to Racket v6.11. > (require crypto crypto/gcrypt) > (crypto-factories gcrypt-factory) > (define key (generate-private-key 'rsa)) > key (object:gcrypt-rsa-key% ...) > (define pub (pk-key->public-only-key key)) > pub (object:gcrypt-rsa-key% ...) > (public-key=? key pub) #t > (public-key=? key (datum->pk-key (pk-key->datum key 'OneAsymmetricKey) 'OneAsymmetricKey)) #f > (public-key=? key (datum->pk-key (pk-key->datum key 'RSAPrivateKey) 'RSAPrivateKey)) #f > (public-key=? key (datum->pk-key (pk-key->datum key 'rkt-private) 'rkt-private)) #f The docs state that GCrypt does not have the ability to recompute a public key component form the data in a 'PrivateKeyInfo format, so that's no good. pk-keys are objects, not structs, and there doesn't appear to be any way to say "here's a private key and a public key, composite them". This has to be a thing that people do, so what am I missing? -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.

