cryptography icon indicating copy to clipboard operation
cryptography copied to clipboard

Add DSA

Open alex opened this issue 13 years ago • 10 comments

Things that need to happen;

  • [x] OpenSSL bindings
  • [x] Interfaces for key objects
  • [x] Key generation
  • [x] test vectors
  • [x] Signature API
  • [x] Verification API

alex avatar Nov 06 '13 23:11 alex

First hard API design question:

RSAPrivateKey objects have a public_key method which returns an RSAPublicKey. Presumably we'd like to have the same on DSAPrivateKey. Unfortunately DSA keys contain a member (y) which is also typically known by public_key.

It seems we have three choices:

  • Be inconsistent with typical naming conventions around DSA
  • Be inconsistent with the RSA API
  • Change the RSA API as well

Opinions?

alex avatar Feb 26 '14 19:02 alex

What APIs call only the bare y a public key?

Seems like public_key should return a DSAPublicKey and that y parameter should just be y to me.

public avatar Mar 01 '14 10:03 public

It'd be nice to store the DSA params as an object, which then makes DSAPublicKey a more useful object.

private_key = dsa.DSAPrivateKey.generate(2048, backend)
params = private_key.params()
public_key = private_key.public_key()
same_params = public_key.params()
print(params.p)
print(same_params.p)

reaperhulk avatar Mar 01 '14 13:03 reaperhulk

@reaperhulk agreed.

cipherself avatar Mar 01 '14 15:03 cipherself

@public We've typically tried to offer the more verbose name whenever possible here, PyCrypto's docs describe y as Public key (y), I haven't seen any other reference on this.

alex avatar Mar 01 '14 18:03 alex

@alex I think the to-do list needs to be updated?

cipherself avatar Apr 24 '14 09:04 cipherself

I've updated the list.

reaperhulk avatar Apr 24 '14 15:04 reaperhulk

@reaperhulk Awesome, thanks :)

cipherself avatar Apr 24 '14 15:04 cipherself

I guess we're done here.

alex avatar May 02 '14 15:05 alex

High fives all round.

public avatar May 02 '14 15:05 public