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

Expiration parameter #145

Closed
wants to merge 87 commits into from
Closed

Expiration parameter #145

wants to merge 87 commits into from

Commits on Mar 14, 2018

  1. if user has no hash prefs in signature, default to sha1/sha256/sha512…

    … options
    Sanjana Rajan committed Mar 14, 2018
    Configuration menu
    Copy the full SHA
    d86a2b9 View commit details
    Browse the repository at this point in the history
  2. Export contents of sym encrypted packet

    Sanjana Rajan committed Mar 14, 2018
    Configuration menu
    Copy the full SHA
    b9c3c61 View commit details
    Browse the repository at this point in the history

Commits on Mar 28, 2018

  1. Add secp256k1 / x25519 / brainpool curves to openpgp

    Sanjana Rajan committed Mar 28, 2018
    Configuration menu
    Copy the full SHA
    570d0c5 View commit details
    Browse the repository at this point in the history

Commits on Mar 29, 2018

  1. fixing imported but not used

    cuthix committed Mar 29, 2018
    Configuration menu
    Copy the full SHA
    53f119a View commit details
    Browse the repository at this point in the history

Commits on Apr 5, 2018

  1. Add EncryptText function

    KAYLukas committed Apr 5, 2018
    Configuration menu
    Copy the full SHA
    42d0a4f View commit details
    Browse the repository at this point in the history

Commits on Apr 6, 2018

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

Commits on Apr 16, 2018

  1. Correct signature type

    jalehotsky committed Apr 16, 2018
    Configuration menu
    Copy the full SHA
    845885a View commit details
    Browse the repository at this point in the history

Commits on Apr 17, 2018

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

Commits on Apr 18, 2018

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

Commits on Apr 19, 2018

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

Commits on May 7, 2018

  1. Merge pull request #3 from ProtonMail/canonizing

    Fix: canonizing of literal data for encrypted messages
    sanjanarajan authored May 7, 2018
    Configuration menu
    Copy the full SHA
    b7621a1 View commit details
    Browse the repository at this point in the history

Commits on May 9, 2018

  1. on my way to fix tests

    cuthix committed May 9, 2018
    Configuration menu
    Copy the full SHA
    687d2b3 View commit details
    Browse the repository at this point in the history

Commits on May 25, 2018

  1. add encrypt private key

    zhj4478 committed May 25, 2018
    Configuration menu
    Copy the full SHA
    e504ad0 View commit details
    Browse the repository at this point in the history
  2. add a notes

    zhj4478 committed May 25, 2018
    Configuration menu
    Copy the full SHA
    cef4d89 View commit details
    Browse the repository at this point in the history
  3. Merge pull request #4 from ProtonMail/private_key_encryption

    Private key encryption
    sanjanarajan authored May 25, 2018
    Configuration menu
    Copy the full SHA
    f32898e View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    9a94ee5 View commit details
    Browse the repository at this point in the history
  5. Merge pull request #5 from ProtonMail/private_key_encryption

    add SerializePrivate without sign function
    zhj4478 authored May 25, 2018
    Configuration menu
    Copy the full SHA
    6d7576e View commit details
    Browse the repository at this point in the history
  6. update private key serializer

    zhj4478 committed May 25, 2018
    Configuration menu
    Copy the full SHA
    2029d42 View commit details
    Browse the repository at this point in the history

Commits on Jun 4, 2018

  1. Merge pull request #6 from ProtonMail/private_key_encryption

    update private key serializer
    sanjanarajan authored Jun 4, 2018
    Configuration menu
    Copy the full SHA
    0b735be View commit details
    Browse the repository at this point in the history

Commits on Jun 6, 2018

  1. refactoring to prepare for new keygen

    Sanjana Rajan committed Jun 6, 2018
    Configuration menu
    Copy the full SHA
    1807512 View commit details
    Browse the repository at this point in the history
  2. WIP tests

    Sanjana Rajan committed Jun 6, 2018
    Configuration menu
    Copy the full SHA
    29411dc View commit details
    Browse the repository at this point in the history
  3. go fmt

    Sanjana Rajan committed Jun 6, 2018
    Configuration menu
    Copy the full SHA
    77a676d View commit details
    Browse the repository at this point in the history
  4. oops

    Sanjana Rajan committed Jun 6, 2018
    Configuration menu
    Copy the full SHA
    dcc2718 View commit details
    Browse the repository at this point in the history

Commits on Jun 9, 2018

  1. WIP curve25519 keygen

    Sanjana Rajan authored and KAYLukas committed Jun 9, 2018
    Configuration menu
    Copy the full SHA
    c460db4 View commit details
    Browse the repository at this point in the history
  2. Bug fix ECPoint

    KAYLukas authored and Sanjana Rajan committed Jun 9, 2018
    Configuration menu
    Copy the full SHA
    e7c1c8c View commit details
    Browse the repository at this point in the history

Commits on Jun 12, 2018

  1. Merge pull request #7 from ProtonMail/keygen

    X25519 keygen
    sanjanarajan authored Jun 12, 2018
    Configuration menu
    Copy the full SHA
    7b468c2 View commit details
    Browse the repository at this point in the history

Commits on Jun 14, 2018

  1. move rsa and rand packages into library

    Sanjana Rajan committed Jun 14, 2018
    Configuration menu
    Copy the full SHA
    2b200e9 View commit details
    Browse the repository at this point in the history

Commits on Jun 15, 2018

  1. rsa optimizations

    Sanjana Rajan committed Jun 15, 2018
    Configuration menu
    Copy the full SHA
    f9ef011 View commit details
    Browse the repository at this point in the history
  2. add syscall

    Sanjana Rajan committed Jun 15, 2018
    Configuration menu
    Copy the full SHA
    cbc96a9 View commit details
    Browse the repository at this point in the history
  3. step after first random number generated

    Sanjana Rajan committed Jun 15, 2018
    Configuration menu
    Copy the full SHA
    0b5f176 View commit details
    Browse the repository at this point in the history

Commits on Jun 18, 2018

  1. allow prepopulated primes

    Sanjana Rajan committed Jun 18, 2018
    Configuration menu
    Copy the full SHA
    83c70fd View commit details
    Browse the repository at this point in the history
  2. don't support sym enc with no MDC

    Sanjana Rajan committed Jun 18, 2018
    Configuration menu
    Copy the full SHA
    685acb5 View commit details
    Browse the repository at this point in the history
  3. subkey primes

    Sanjana Rajan committed Jun 18, 2018
    Configuration menu
    Copy the full SHA
    9e42511 View commit details
    Browse the repository at this point in the history

Commits on Jan 7, 2019

  1. force release of memory

    cuthix committed Jan 7, 2019
    Configuration menu
    Copy the full SHA
    2636381 View commit details
    Browse the repository at this point in the history

Commits on Feb 4, 2019

  1. Configuration menu
    Copy the full SHA
    44302ed View commit details
    Browse the repository at this point in the history
  2. Merge pull request #12 from twiss/ecdh-workaround

    Work around OpenPGP.js bug encrypting ECDH messages
    sanjanarajan authored Feb 4, 2019
    Configuration menu
    Copy the full SHA
    02c1a38 View commit details
    Browse the repository at this point in the history

Commits on Feb 5, 2019

  1. Configuration menu
    Copy the full SHA
    c8eb4ef View commit details
    Browse the repository at this point in the history
  2. Merge pull request #13 from twiss/sessionkey-decrypt-panic

    Fix panic when decrypting session key with the wrong private key
    sanjanarajan authored Feb 5, 2019
    Configuration menu
    Copy the full SHA
    2379f60 View commit details
    Browse the repository at this point in the history

Commits on Feb 10, 2019

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

Commits on Feb 11, 2019

  1. Buffer partialLengthWriter to write in chunks of >= 512 bytes

    The first chunk has to be at least 512 bytes per spec, and very
    large amounts (e.g. 10MB) of tiny chunks hang both this library
    and OpenPGP.js when reading.
    twiss committed Feb 11, 2019
    Configuration menu
    Copy the full SHA
    0978818 View commit details
    Browse the repository at this point in the history

Commits on Feb 20, 2019

  1. Merge pull request #14 from twiss/buffered-streaming

    Buffer partialLengthWriter to write in chunks of >= 512 bytes
    sanjanarajan authored Feb 20, 2019
    Configuration menu
    Copy the full SHA
    25f88b7 View commit details
    Browse the repository at this point in the history

Commits on Mar 3, 2019

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

Commits on Mar 4, 2019

  1. Merge pull request #15 from twiss/fix-ecdh

    Fix missing leading zeros in ECDH messages
    sanjanarajan authored Mar 4, 2019
    Configuration menu
    Copy the full SHA
    1bfafb5 View commit details
    Browse the repository at this point in the history

Commits on Mar 28, 2019

  1. Configuration menu
    Copy the full SHA
    5756cae View commit details
    Browse the repository at this point in the history
  2. Merge pull request #17 from twiss/use-latest-self-sig

    Use latest-created valid self-signature
    sanjanarajan authored Mar 28, 2019
    Configuration menu
    Copy the full SHA
    3ab2feb View commit details
    Browse the repository at this point in the history

Commits on Apr 10, 2019

  1. Configuration menu
    Copy the full SHA
    fc5a2b7 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a05b07e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5173560 View commit details
    Browse the repository at this point in the history

Commits on Apr 11, 2019

  1. Add higher-level function to verify clearsigned messages

    Also, verify that the algorithm mentioned in the header matches
    the algorithm used in the signature.
    twiss committed Apr 11, 2019
    Configuration menu
    Copy the full SHA
    01f2cca View commit details
    Browse the repository at this point in the history
  2. Merge pull request #18 from twiss/security-fixes

    Security fixes
    twiss authored Apr 11, 2019
    Configuration menu
    Copy the full SHA
    27c95c8 View commit details
    Browse the repository at this point in the history

Commits on Apr 12, 2019

  1. Configuration menu
    Copy the full SHA
    bb79d83 View commit details
    Browse the repository at this point in the history
  2. Fix merge

    twiss committed Apr 12, 2019
    Configuration menu
    Copy the full SHA
    ea6ef6c View commit details
    Browse the repository at this point in the history
  3. Fix packet tests

    twiss committed Apr 12, 2019
    Configuration menu
    Copy the full SHA
    7abb221 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    b110f49 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    309e5a9 View commit details
    Browse the repository at this point in the history
  6. Fix RSA tests

    twiss committed Apr 12, 2019
    Configuration menu
    Copy the full SHA
    68a1e81 View commit details
    Browse the repository at this point in the history
  7. Add Travis CI

    twiss committed Apr 12, 2019
    Configuration menu
    Copy the full SHA
    3431f2e View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    31f8b48 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    6909f06 View commit details
    Browse the repository at this point in the history
  10. Re-fix bitlength for generated ECC keys

    See b4956d3.
    twiss committed Apr 12, 2019
    Configuration menu
    Copy the full SHA
    3a07e4a View commit details
    Browse the repository at this point in the history

Commits on Apr 23, 2019

  1. Update README.md

    sanjanarajan authored Apr 23, 2019
    Configuration menu
    Copy the full SHA
    c45e2a1 View commit details
    Browse the repository at this point in the history

Commits on Apr 27, 2019

  1. Merge pull request #19 from twiss/fix-tests

    Fix tests; merge golang/master
    twiss authored Apr 27, 2019
    Configuration menu
    Copy the full SHA
    33a45b6 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4acdaca View commit details
    Browse the repository at this point in the history
  3. Accept multiple Hash headers / header values in clearsigned messages

    Also, accept no headers at all, defaulting to MD5.
    twiss committed Apr 27, 2019
    Configuration menu
    Copy the full SHA
    efb430e View commit details
    Browse the repository at this point in the history

Commits on May 13, 2019

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

Commits on May 14, 2019

  1. openpgp: fix signing (#20)

    horejsek authored and twiss committed May 14, 2019
    Configuration menu
    Copy the full SHA
    ebf3fa0 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a36a95c View commit details
    Browse the repository at this point in the history

Commits on May 23, 2019

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

Commits on Jun 4, 2019

  1. Fix serialization and handling of MPIs with leading zeros (#22)

    * Fix for KeyID digest generation
    
    ProtonMail/gopenpgp#10
    
    * Better solution
    
    * Fix bitLength when first byte is zero
    
    * Use encoding.NewMPI in NewECDSAPublicKey; remove NewMPIWithBitLength
    
    * Use Len8 instead of Len to get the bit length of a byte
    
    * Don't serialize leading zeros in MPIs
    
    * Properly handle MPIs with leading zeros
    
    * Remove unused MPI functions
    Savely Krasovsky authored and twiss committed Jun 4, 2019
    Configuration menu
    Copy the full SHA
    d3d8a14 View commit details
    Browse the repository at this point in the history

Commits on Aug 14, 2019

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

Commits on Aug 28, 2019

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

Commits on Sep 3, 2019

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

Commits on Nov 4, 2019

  1. openpgp: support GNU dummy S2K for missing private keys

    GNU defines an extension to the S2K algorithms where the private
    key of a PGP is missing and only subkeys are present. These
    incomplete keys are useful in scenarios where a user distributes
    various subkeys to individual places (e.g. various build servers)
    while retaining the master key. Picking up https://go-review.googlesource.com/c/crypto/+/32797/
    after it was abandoned.
    
    The extension is described at: http://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=blob;f=doc/DETAILS;h=fe55ae16ab4e26d8356dc574c9e8bc935e71aef1;hb=23191d7851eae2217ecdac6484349849a24fd94a#l1109
    
    Change-Id: I2de52a4f86b113eb7debf92579a6f79836d86c3c
    syadav2015 committed Nov 4, 2019
    Configuration menu
    Copy the full SHA
    15a616a View commit details
    Browse the repository at this point in the history

Commits on Nov 9, 2019

  1. Refactor end-to-end tests (#37)

    zugzwang authored and twiss committed Nov 9, 2019
    Configuration menu
    Copy the full SHA
    60837c4 View commit details
    Browse the repository at this point in the history

Commits on Nov 20, 2019

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

Commits on Nov 22, 2019

  1. Support re-serializing parsed encrypted private keys (#42)

    Store S2K parameters in a new s2k.Params struct, instead of in a
    s2k.Config, so that we can properly re-serialize them.
    wussler authored and twiss committed Nov 22, 2019
    Configuration menu
    Copy the full SHA
    18fc5a7 View commit details
    Browse the repository at this point in the history
  2. Add support for AEAD Encrypted Data Packets (#36)

    And V5 Symmetrically Encrypted Data Packets (which use AEAD as well).
    
    To enable AEAD when encrypting messages symmetrically, pass:
    
        &packet.Config{
            AEADConfig: &packet.AEADConfig{}
        }
    
    to `openpgp.EncryptSymmetrically`. To enable AEAD when using public-key
    cryptography, pass the same config to `openpgp.NewEntity` to announce
    support for AEAD in the newly generated key. This library will
    automatically use AEAD when encrypting to keys that claim to support it.
    
    It is also possible to change the AEAD mode that is used when encrypting
    symmetrically, or the preferred AEAD mode when generating a key, by
    passing:
    
            AEADConfig: &packet.AEADConfig{
                DefaultMode: packet.AEADModeEAX
            }
    
    `AEADModeEAX` is the default. The other options are `AEADModeOCB` and
    `AEADModeExperimentalGCM`. The latter is a private/experimental
    algorithm, and not defined in the spec. It is also supported by
    OpenPGP.js, but not, at the moment, GPG. It is typically the most
    performant option, as GCM is implemented in asm.
    
    And finally, when encrypting (either symmetrically or asymmetrically),
    it is also possible to pass the chunk size that is used:
    
                ChunkSize: 1 << 10 // 1KiB
    
    A smaller chunk size means that, when en/decrypting a stream, you'll
    receive data sooner (and more often). It also means a marginally bigger
    overhead (16 bytes per chunk). The default is 256KiB, which we feel
    strikes a decent balance, although that might not be the case for
    gigantic messages. The passed chunk size is rounded down to the closest
    power of two and clamped between 64 bytes and 128 MiB.
    (According to the spec, chunk sizes larger than 128 MiB (1 << 27 bytes)
    SHOULD NOT be used, although the packet format allows it.)
    
    Note: when using SerializeSymmetricKeyEncryptedReuseKey, one must now
    set a non-nil config.AEADConfig when used with an AEAD Encrypted Data
    Packet, and similarly one must call SerializeAEADEncrypted after calling
    SerializeSymmetricKeyEncryptedReuseKey with a non-nil config.AEADConfig.
    
    See https://tools.ietf.org/html/draft-ietf-openpgp-rfc4880bis-08.
    zugzwang authored and twiss committed Nov 22, 2019
    Configuration menu
    Copy the full SHA
    e77a1f0 View commit details
    Browse the repository at this point in the history

Commits on Apr 6, 2020

  1. Configuration menu
    Copy the full SHA
    3e71139 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1e8bf1c View commit details
    Browse the repository at this point in the history

Commits on Apr 14, 2020

  1. Configuration menu
    Copy the full SHA
    142ca78 View commit details
    Browse the repository at this point in the history
  2. Fix tests for old Go (#48)

    Go 1.10 fails because it's missing golang/go@4d44a87.
    twiss authored Apr 14, 2020
    Configuration menu
    Copy the full SHA
    af60022 View commit details
    Browse the repository at this point in the history

Commits on Apr 15, 2020

  1. Implement GNU-dummy keys

    Merge branch 'change-191658-4' from
    https://go-review.googlesource.com/c/crypto/+/191658.
    
    Note: on our side, this merge commit also:
    - Removes SerializePrivateNoSign in favor of the new
      SerializePrivateWithoutSigning.
    - Removes SelfSign (NewEntity already self-signs, although
      it used to be buggy, but this has been fixed).
    - Un-exports SerializeEncrypted and SerializeUnEncrypted.
    - Adds a serializeDummy function, and reorders the
      serializeEncrypted and serializeUnencrypted functions.
    
    On the incoming side, this merge commit also:
    - Replaces PrivateKey.Dummy with a PrivateKey.Dummy()
      function, which reads from the stored s2kParams property
      (which upstream doesn't have).
    - Reorders the serializePrivate, SerializePrivate and
      SerializePrivateWithoutSigning functions, and updates the
      comments of the latter two.
    twiss committed Apr 15, 2020
    Configuration menu
    Copy the full SHA
    a103d74 View commit details
    Browse the repository at this point in the history

Commits on Apr 16, 2020

  1. Randomize tests, fix broken key (#34)

    zugzwang authored and twiss committed Apr 16, 2020
    Configuration menu
    Copy the full SHA
    1fa7f40 View commit details
    Browse the repository at this point in the history

Commits on Apr 20, 2020

  1. Fix build on OpenBSD

    twiss committed Apr 20, 2020
    Configuration menu
    Copy the full SHA
    71bec36 View commit details
    Browse the repository at this point in the history

Commits on May 27, 2020

  1. openpgp: Always generate preferred algorithms at key generation (#50)

    Also, refactor NewEntity, separating signing/encryption key generation.
    This way, we can reuse the code for adding subkeys.
    
    Also, use NewSignerPrivateKey instead of New{RSA,EdDSA}PrivateKey,
    and add NewDecrypterPrivateKey to replace New{RSA,ECDH}PrivateKey.
    
    Also, use pointers instead of values for EdDSA PrivateKey and PublicKey,
    for consistency with the other algorithms.
    zugzwang authored May 27, 2020
    Configuration menu
    Copy the full SHA
    00945d6 View commit details
    Browse the repository at this point in the history

Commits on Jun 5, 2020

  1. openpgp: add RevokeKey, RevokeSubkey, AddSigningSubkey and AddEncrypt…

    …ionSubkey methods to Entity (#53)
    
    The existing implementation does not support operations on subkeys using
    the library, so the following changes have been made to support subkey
    interactions as per RFC 4880 (https://tools.ietf.org/html/rfc4880).
    
    1. AddSigningSubkey and AddEncryptionSubkey add support for generating
    new subkeys associated with an entity.
    2. RevokeKey generates a key revocation signature for an entity.
    3. RevokeSubkey generates a subkey revocation signature for a subkey.
    4. Add Revocation reason subpacket and EmbeddedSignature subpacket to
    output subpackets with corresponding tests.
    5. Re-sign the embedded signatures for subkeys in entity.SerializePrivate().
    
    Fixes golang/go#29301
    
    Change-Id: If8ee111e825c17ccaa19e4afbac4a756671d9bf5
    twiss authored Jun 5, 2020
    Configuration menu
    Copy the full SHA
    11f6ee2 View commit details
    Browse the repository at this point in the history