agora-glass_pumpkin icon indicating copy to clipboard operation
agora-glass_pumpkin copied to clipboard

Why large minimum bit length?

Open BartMassey opened this issue 3 years ago • 3 comments

I am using glass_pumpkin for a teaching demo, and really just want 32-bit primes. Is there some reason for the restriction to 128 bits or more? Sure would be great to remove it for my use case.

BartMassey avatar Jan 09 '22 06:01 BartMassey

Mostly it’s because for cryptographic means anything smaller is insecure. You could use my cunningham_chain project which will do any size.

mikelodder7 avatar Jan 09 '22 23:01 mikelodder7

I figured that must be it. 128 is already too small for modern crypto, though? Probably 512 is as small as it should go in that case, maybe 1024.

Any chance of taking a PR to provide an "insecure_prime" path or somesuch? Right now I'm just generating random odd numbers and testing them with safe_prime(), which seems a little silly.

BartMassey avatar Jan 10 '22 01:01 BartMassey

Probably wouldn't hurt. 128 is useful for ECC crypto with hyperelliptic curves but anyone doing RSA like primes knows 128 is definitely too small.

mikelodder7 avatar Jan 10 '22 15:01 mikelodder7