Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 2 upgrade of go-crypto #182

Merged
merged 116 commits into from
Jan 18, 2024
Merged

Version 2 upgrade of go-crypto #182

merged 116 commits into from
Jan 18, 2024

Commits on Oct 24, 2023

  1. Add support for v6 public key and secret key packets

    Updates the parsing and serialization methods to support v6 keys.
    Adds the AEAD s2k type for secret key encryption but does not implement the feature
    yet.
    lubux committed Oct 24, 2023
    Configuration menu
    Copy the full SHA
    0eb9fa5 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6199e47 View commit details
    Browse the repository at this point in the history
  3. Add support for v6 signatures

    This change implements the necessary updates for parsing and serializing v6 signature
    packets. Further it implements the v6 signature salt. V6 signatures require that a salt is
    prepended to the signing content before creating the signature hash. In this commit, we
    add this feature, which requires a change in the API for signing content.
    The Sign API takes an externally created hasher object as an argument to sign.
    To ensure that the salt is hashed before the conten in v6 singatures, we introduce a
    PrepareSignature method that creates a hasher object with prepended salt.
    lubux committed Oct 24, 2023
    Configuration menu
    Copy the full SHA
    fecd413 View commit details
    Browse the repository at this point in the history
  4. Add support for direct-key signatures and v6 key messages

    This commit introduces support for direct-key signatures and ensures that version 6 keys
    store their properties in it. Instead of calling PrimaryIdentity to access a keys properties,
    one should now call PrimarySelfSignature to get the primary self-signature of a key.
    lubux committed Oct 24, 2023
    Configuration menu
    Copy the full SHA
    c0784f9 View commit details
    Browse the repository at this point in the history
  5. Add support for v6 one-pass-signatures and update read/write API

    This commit implements version 6 one-pass-signatures. Further, it updates the read/write
    API to support v6 signatures with salt and fingerprints.
    lubux committed Oct 24, 2023
    Configuration menu
    Copy the full SHA
    35770b9 View commit details
    Browse the repository at this point in the history
  6. Remove armor checksums

    This change removes armor checksums and removes checks accordingly.
    lubux committed Oct 24, 2023
    Configuration menu
    Copy the full SHA
    7ed878a View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    b5fb1e3 View commit details
    Browse the repository at this point in the history
  8. FIX: SignatureType constants

    All these constants should have the type
    SignatureType and not int.
    lubux committed Oct 24, 2023
    Configuration menu
    Copy the full SHA
    d1a77a1 View commit details
    Browse the repository at this point in the history
  9. Add support for Padding packets

    lubux committed Oct 24, 2023
    Configuration menu
    Copy the full SHA
    b11525d View commit details
    Browse the repository at this point in the history
  10. Add support for SKESK v6

    lubux committed Oct 24, 2023
    Configuration menu
    Copy the full SHA
    ff41495 View commit details
    Browse the repository at this point in the history
  11. Add support for PKESK v6

    lubux committed Oct 24, 2023
    Configuration menu
    Copy the full SHA
    741dddf View commit details
    Browse the repository at this point in the history
  12. Add support for v6 AEAD private key encryption

    The OpenPGP crypto refresh allows to encrypt secret keys with AEAD encryption.
    In this commit, we add AEAD secret key encryption and the addtional HKDF step in
    key derivation. The packet.Config contains a new field to configure the type of secret
    key encryption.
    lubux committed Oct 24, 2023
    Configuration menu
    Copy the full SHA
    ed35ec1 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    dc99efd View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    306ec0d View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    253d004 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    2581248 View commit details
    Browse the repository at this point in the history
  17. Remove S2K secret key encryption type from config

    The aead secret key encrypton mode is now enabled by setting the aead config in config.
    lubux committed Oct 24, 2023
    Configuration menu
    Copy the full SHA
    f3bce80 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    d0b8f30 View commit details
    Browse the repository at this point in the history
  19. Add Argon2-AEAD encrypted secret key test case

    Added a test case for v6 Argon2-AEAD encrypted secret keys, which was
    freshly included in the crypto refresh rfc:
    https://gitlab.com/openpgp-wg/rfc4880bis/-/merge_requests/274
    lubux committed Oct 24, 2023
    Configuration menu
    Copy the full SHA
    eb368c2 View commit details
    Browse the repository at this point in the history
  20. Add support for v6 signatures in cleartext messages

    This commit, updates the cleartext signature api to support v6 signatures.
    Cleartext messages with v6 signatures require a new header, which specifies
    the used hash function in combination with the used salt. It now checks that the
    salt and hash matches with the contained v6 signature.
    lubux committed Oct 24, 2023
    Configuration menu
    Copy the full SHA
    4147fe2 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    c62d973 View commit details
    Browse the repository at this point in the history
  22. Implements clearsign message for v6 correctly

    This commit ensures that cleatext messages with v6 signatures
    contain a salted hash header with the matching hash and salt.
    Allows for both v4 and v6 signatures in the same message with mixed headers.
    lubux committed Oct 24, 2023
    Configuration menu
    Copy the full SHA
    0510848 View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    79a381f View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    7f0b978 View commit details
    Browse the repository at this point in the history
  25. Add V6 getter method in config

    lubux committed Oct 24, 2023
    Configuration menu
    Copy the full SHA
    848b22f View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    2141f18 View commit details
    Browse the repository at this point in the history
  27. Fix naming issues

    lubux committed Oct 24, 2023
    Configuration menu
    Copy the full SHA
    bd16267 View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    26afebe View commit details
    Browse the repository at this point in the history
  29. Imitate model for v6 direct key self-signatures from identity self-si…

    …gnatures
    
    Ensures that a v6 key contains a valid direct-key signature for the primary key
    that stores its properties. On parsing a v6 key, the newest direct-key signature
    is selected and checked for validity while other signatures are stored but ignored.
    lubux committed Oct 24, 2023
    Configuration menu
    Copy the full SHA
    7f25dd6 View commit details
    Browse the repository at this point in the history
  30. Configuration menu
    Copy the full SHA
    a2c729e View commit details
    Browse the repository at this point in the history
  31. Update PKESK to the latest version of the crypto refresh

    This commit changes the PKESK parsing and serialization methods to the
    updated encodings of x25519 and x488 ciphertexts for v3 PKESK. Instead
    of encoding the symmetric key algorithm in the ciphertext with padding, the
    symmetric key algorithm is now encoded unencrypted.
    Further, the commit refactors the checksum handling and enforces AES with v3 PKESK
    for the above algorithms.
    lubux committed Oct 24, 2023
    Configuration menu
    Copy the full SHA
    d84a83c View commit details
    Browse the repository at this point in the history
  32. Run gofmt on project

    lubux committed Oct 24, 2023
    Configuration menu
    Copy the full SHA
    a4e36b0 View commit details
    Browse the repository at this point in the history
  33. Fix one-pass-signature parsing with wrong version

    One-pass-signature parsing now directly returns an error if an unsuported
    version is parsed.
    lubux committed Oct 24, 2023
    Configuration menu
    Copy the full SHA
    3c375b0 View commit details
    Browse the repository at this point in the history
  34. Only check HashTag when sig.Version greater than 4

    Addresses #107.
    lubux committed Oct 24, 2023
    Configuration menu
    Copy the full SHA
    c92612b View commit details
    Browse the repository at this point in the history
  35. Update HKDF in X25519 and X448

    The input to the HKDF function now includes the ephemeral public key and
    the recipient public key as described in the latest version of the crypto refresh.
    https://gitlab.com/openpgp-wg/rfc4880bis/-/merge_requests/278
    lubux committed Oct 24, 2023
    Configuration menu
    Copy the full SHA
    51e16b3 View commit details
    Browse the repository at this point in the history
  36. Add CRC24 armor footer

    When forming ASCII Armor, the CRC24 footer should not be generated according
    to the crypto refresh. However, due to a compatibility issue with GnuPG, we
    generate them for now and pospone the removal to version 2 of go-crypto.
    lubux committed Oct 24, 2023
    Configuration menu
    Copy the full SHA
    f90e664 View commit details
    Browse the repository at this point in the history
  37. Ensure correct key derivation when encrypting multiple keys with aead

    Fixes an issue in EncryptPrivateKeys, where the hkdf was applied
    to the last hkdf derived key instead of the s2k dervided key.
    lubux committed Oct 24, 2023
    Configuration menu
    Copy the full SHA
    98de8c7 View commit details
    Browse the repository at this point in the history
  38. Add testcase for reading a v6 PKESK encrypted message

    Adds a testcase for the following crypto refresh test vector:
    https://gitlab.com/openpgp-wg/rfc4880bis/-/merge_requests/302
    lubux committed Oct 24, 2023
    Configuration menu
    Copy the full SHA
    3573e94 View commit details
    Browse the repository at this point in the history
  39. Update PKESKv6 serialization/parsing to the new packet format

    This commit updates PKESKv6 serialization/parsing to the newest version
    of the standart, see:
    https://gitlab.com/openpgp-wg/rfc4880bis/-/merge_requests/304
    lubux committed Oct 24, 2023
    Configuration menu
    Copy the full SHA
    509d55f View commit details
    Browse the repository at this point in the history
  40. Update one-pass signature v6 packets to latest crypto refresh version

    This commit updates the serialization/parse methods of one-pass signature packets
    to the latest updated version of the crypto refresh. See:
    https://gitlab.com/openpgp-wg/rfc4880bis/-/merge_requests/305
    lubux committed Oct 24, 2023
    Configuration menu
    Copy the full SHA
    c1f4c6f View commit details
    Browse the repository at this point in the history
  41. Remove salted hash header from signed cleartext messages

    The salted hash header in cleartext messages was removed from the crypto refresh:
    https://gitlab.com/openpgp-wg/rfc4880bis/-/merge_requests/313
    This commit adds the following changes to cleartext messages:
    - removes the salted hash header logic
    - only produces ''Hash" headers if no v6 signatures are present
    - ignores any parsed headers in signature verification
    lubux committed Oct 24, 2023
    Configuration menu
    Copy the full SHA
    1dd6feb View commit details
    Browse the repository at this point in the history
  42. Configuration menu
    Copy the full SHA
    21092dc View commit details
    Browse the repository at this point in the history
  43. Configuration menu
    Copy the full SHA
    774c082 View commit details
    Browse the repository at this point in the history
  44. Configuration menu
    Copy the full SHA
    1d56dee View commit details
    Browse the repository at this point in the history
  45. Update depdency versions

    lubux committed Oct 24, 2023
    Configuration menu
    Copy the full SHA
    633db87 View commit details
    Browse the repository at this point in the history
  46. Configuration menu
    Copy the full SHA
    696c023 View commit details
    Browse the repository at this point in the history
  47. Configuration menu
    Copy the full SHA
    60fa713 View commit details
    Browse the repository at this point in the history
  48. Configuration menu
    Copy the full SHA
    3493ab3 View commit details
    Browse the repository at this point in the history
  49. Remove changelog-v2 file

    lubux committed Oct 24, 2023
    Configuration menu
    Copy the full SHA
    c695db0 View commit details
    Browse the repository at this point in the history
  50. Configuration menu
    Copy the full SHA
    e884ac0 View commit details
    Browse the repository at this point in the history
  51. Configuration menu
    Copy the full SHA
    f598b26 View commit details
    Browse the repository at this point in the history
  52. Configuration menu
    Copy the full SHA
    6e3d94b View commit details
    Browse the repository at this point in the history
  53. Configuration menu
    Copy the full SHA
    320232b View commit details
    Browse the repository at this point in the history
  54. Configuration menu
    Copy the full SHA
    608bc7b View commit details
    Browse the repository at this point in the history
  55. Configuration menu
    Copy the full SHA
    162f22f View commit details
    Browse the repository at this point in the history
  56. Configuration menu
    Copy the full SHA
    d36fda7 View commit details
    Browse the repository at this point in the history
  57. Configuration menu
    Copy the full SHA
    3cd52da View commit details
    Browse the repository at this point in the history
  58. Configuration menu
    Copy the full SHA
    19c7808 View commit details
    Browse the repository at this point in the history
  59. Configuration menu
    Copy the full SHA
    3e41c8c View commit details
    Browse the repository at this point in the history
  60. Configuration menu
    Copy the full SHA
    48f7095 View commit details
    Browse the repository at this point in the history
  61. Configuration menu
    Copy the full SHA
    53ffda9 View commit details
    Browse the repository at this point in the history
  62. Configuration menu
    Copy the full SHA
    3bdcc5b View commit details
    Browse the repository at this point in the history
  63. Configuration menu
    Copy the full SHA
    778b489 View commit details
    Browse the repository at this point in the history
  64. feat(v2): Change message details signature candidate selection for no…

    … match
    
    In the case that no signature canidate verifies successfuly, the md.SignatureError should
    not point to the last candidate error in the list but rather to the last candidate error with a key match (if any).
    lubux committed Oct 24, 2023
    Configuration menu
    Copy the full SHA
    4294467 View commit details
    Browse the repository at this point in the history
  65. Configuration menu
    Copy the full SHA
    3443512 View commit details
    Browse the repository at this point in the history
  66. Configuration menu
    Copy the full SHA
    9e18830 View commit details
    Browse the repository at this point in the history
  67. feat(v2): Allow to set the time for selecting keys in encryption

    This commit adds an EncryptionTime time field to the EncryptParams struct.
    If provided in encryption, it overrides the time for key selection. It allows to
    disable expiration ckecks by setting the time to zero.
    lubux committed Oct 24, 2023
    Configuration menu
    Copy the full SHA
    174dc6b View commit details
    Browse the repository at this point in the history
  68. feat: Do not allow to generate or use v6 keys with legacy oid

    Implementations MUST NOT accept or generate v6 key material using the deprecated OIDs.
    lubux committed Oct 24, 2023
    Configuration menu
    Copy the full SHA
    94d8fd9 View commit details
    Browse the repository at this point in the history
  69. Configuration menu
    Copy the full SHA
    4c9baeb View commit details
    Browse the repository at this point in the history
  70. Configuration menu
    Copy the full SHA
    d1f7ff4 View commit details
    Browse the repository at this point in the history
  71. Configuration menu
    Copy the full SHA
    0c44431 View commit details
    Browse the repository at this point in the history

Commits on Nov 22, 2023

  1. Configuration menu
    Copy the full SHA
    4aabb69 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    820b395 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    13e4612 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    3198ed3 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    49087ba View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    3d55a7e View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    1408255 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    c10c41e View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    4863db4 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    ddb84e3 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    1dc0808 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    708c2ad View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    fb84e16 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    78f1529 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    f0a31d2 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    bf37126 View commit details
    Browse the repository at this point in the history

Commits on Nov 23, 2023

  1. Configuration menu
    Copy the full SHA
    cc1afdc View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    be8d42d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3db5173 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    1ab7fbc View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    1f9ab12 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    59054bc View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    dc7272a View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    d16b56e View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    efe3451 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    bebb8bc View commit details
    Browse the repository at this point in the history
  11. chore: Update gitignore

    lubux committed Nov 23, 2023
    Configuration menu
    Copy the full SHA
    e94987c View commit details
    Browse the repository at this point in the history
  12. docs(packet): Fix grammar issue in config comments

    Co-authored-by: Aron Wussler <[email protected]>
    lubux and wussler committed Nov 23, 2023
    Configuration menu
    Copy the full SHA
    26e7edc View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    e3b2b43 View commit details
    Browse the repository at this point in the history

Commits on Nov 24, 2023

  1. Configuration menu
    Copy the full SHA
    d47e648 View commit details
    Browse the repository at this point in the history

Commits on Nov 27, 2023

  1. Configuration menu
    Copy the full SHA
    8b9879a View commit details
    Browse the repository at this point in the history
  2. docs(v2): Fix comment issues

    lubux committed Nov 27, 2023
    Configuration menu
    Copy the full SHA
    8781dd3 View commit details
    Browse the repository at this point in the history

Commits on Nov 30, 2023

  1. Configuration menu
    Copy the full SHA
    f5a3bd6 View commit details
    Browse the repository at this point in the history

Commits on Dec 11, 2023

  1. Configuration menu
    Copy the full SHA
    eafe562 View commit details
    Browse the repository at this point in the history
  2. Apply suggestions from code review

    Co-authored-by: Aron Wussler <[email protected]>
    lubux and wussler authored Dec 11, 2023
    Configuration menu
    Copy the full SHA
    008cc9d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f2990fa View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    ae457d1 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    0a030a3 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    2cc531d View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    9cf78f4 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    0b527c6 View commit details
    Browse the repository at this point in the history

Commits on Jan 5, 2024

  1. Configuration menu
    Copy the full SHA
    a09d905 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    38191b9 View commit details
    Browse the repository at this point in the history

Commits on Jan 17, 2024

  1. Configuration menu
    Copy the full SHA
    75630f2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    93256de View commit details
    Browse the repository at this point in the history