mattosaurus / PgpCore

.NET Core class library for using PGP
MIT License
244 stars 98 forks source link

PGP generate key with 2 years of expiration. #217

Closed patel-rohit closed 1 year ago

patel-rohit commented 1 year ago

The following cryptographic standards are required for PGP keys. Can anyone help to generate a key with the following requirement?

Key : RSA Bit Strength: 2048 Key Expiry: Expires within 2 years

mattosaurus commented 1 year ago

Hi, there's no key configuration options in PgpCore but you can do this when you create the key with another method such as gpg

https://www.redhat.com/sysadmin/creating-gpg-keypairs

tadkison commented 1 year ago

when I generate keys using Kleopatra, nothing works to decrypt them using pgpcore (C#) is there a way to configure this to work? I only get "unknown packet type encountered: 20"

mattosaurus commented 1 year ago

Hi @tadkison, could you open a new issue rather than continuing with this unrelated one and post the cod you're using as well as sample public/private keys, password and encrypted file to help me investigate the issue.

tadkison commented 1 year ago

@mattosaurus will do. I think I found a way to do this in gnugpg https://dev.gnupg.org/T6422 I have to remove the AEAD from the generated Key. that allowed it to be decrypted using pgpcore (nothing wrong with your code, just the keys being generated were not good) thanks for the quick reply!