Skip to content
This repository has been archived by the owner on Dec 7, 2019. It is now read-only.

forbid RSA keys smaller than 512 bits #43

Merged
merged 1 commit into from
Sep 28, 2018
Merged

forbid RSA keys smaller than 512 bits #43

merged 1 commit into from
Sep 28, 2018

Conversation

Stebalien
Copy link
Member

@Stebalien Stebalien commented Sep 28, 2018

We do use small keys for testing but keys smaller than this are entirely useless as we need to be able to sign 256bit hashes.

fixes #42

@ghost ghost assigned Stebalien Sep 28, 2018
@ghost ghost added the in progress label Sep 28, 2018
@Stebalien Stebalien requested a review from vyzo September 28, 2018 18:05
@vyzo
Copy link
Contributor

vyzo commented Sep 28, 2018

build failure:

./rsa.go:122:7: sk.Size undefined (type *rsa.PrivateKey has no field or method Size)
./rsa.go:143:7: pk.Size undefined (type *rsa.PublicKey has no field or method Size)

@Stebalien
Copy link
Member Author

(need to update the go version)

We do use small keys for testing but keys smaller than this are entirely useless
as we need to be able to sign 256bit hashes.

fixes #42
@Stebalien
Copy link
Member Author

Nevermind. That would require go 1.11 which I don't really want to force yet (we don't really need it). I've switched to using key.N.BitLen.

@Stebalien Stebalien merged commit 7240b40 into master Sep 28, 2018
@Stebalien Stebalien deleted the fix/42 branch September 28, 2018 20:28
@ghost ghost removed the in progress label Sep 28, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Forbid small RSA keys
2 participants