crypto

2018-12-10T22:54:30.000900Z

hello!

ghadi 2018-12-10T22:55:12.001400Z

---> from #clojure what kind of public key properties are you looking for?

2018-12-10T22:57:51.002400Z

gpg is sort of what I have in mind, but I don't really care about web-of-trust things

2018-12-10T22:58:07.003Z

I would like to be able to generate priv/public keypairs on the fly

ghadi 2018-12-10T22:58:09.003200Z

do you need to interact with various other things, or is it all in house?

ghadi 2018-12-10T22:58:35.003600Z

because java has a bunch of elliptic curves built in https://docs.oracle.com/javase/10/docs/api/index.html?java/security/KeyPair.html

ghadi 2018-12-10T22:59:14.004200Z

GPG can do a lot

ghadi 2018-12-10T22:59:35.005Z

are you looking for public key stuff, or doing key agreement + symmetric crypto?

2018-12-10T22:59:42.005100Z

yeah, I do not need the whole GPG kitchen sink

2018-12-10T23:00:33.006100Z

I would like to be able to generate public and private keys for users, break the private key apart with Shamir's secret sharing, and then store the shares in different places

2018-12-10T23:00:55.006500Z

The idea being to reassemble the private key to decrypt messages encrypted with the public key

ghadi 2018-12-10T23:01:14.006900Z

I see

ghadi 2018-12-10T23:02:14.008Z

that sounds legit. Consider not encrypting using public key encryption alone -- many systems do key wrapping (of a symmetric key)

ghadi 2018-12-10T23:02:47.008700Z

break up the shares for recovery, but the private key is only used to decrypt a symmetric secret, and it's that secret that is used to encrypt/decrypt the data

ghadi 2018-12-10T23:03:09.009200Z

or you can derive secrets from a root secret using a derivation scheme

2018-12-10T23:03:57.010200Z

well, I'd like to start simple and build it up. I was hoping to play around with a toy implementation in a repl, but haven't had a good time with it yet

2018-12-10T23:04:24.010800Z

I looked at buddy, but that requires shelling out to openssl to actually generate the keypair, and I'd rather not have the external dep if I don't need it

2018-12-10T23:10:04.011700Z

ok, cool, the codahale one seems to make a lot more sense than secretshare

2018-12-10T23:10:12.012Z

at least, I've gotten it to work

2018-12-10T23:10:44.012400Z

I'll have to try the java keypair stuff now