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

Update to GopenPGP v3 #258

Merged
merged 186 commits into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
186 commits
Select commit Hold shift + click to select a range
c985195
Readuce the number of similat key derivations for encrypting secret keys
lubux Apr 6, 2023
37fa5a5
Integrate API changes from go-crypto v2
lubux Apr 11, 2023
2d447f8
Create version 3 API for encryption and decryption
lubux Apr 17, 2023
4d9b8e3
Create version 3 API for sign and verify
lubux Apr 25, 2023
26db702
Update message to new API
lubux Apr 28, 2023
680312b
Update session key to the new API
lubux Apr 28, 2023
690bbf3
Introduce profiles for configuration
lubux May 2, 2023
b6826a2
Make utility functions accessible in the main API
lubux May 4, 2023
9c36530
Utility functions for creating keys
lubux May 2, 2023
e5015dc
Remove obsolete code for now
lubux Apr 28, 2023
b191ccd
Add new key type options to key generation
lubux May 3, 2023
a52ce39
Adapt base test
lubux May 3, 2023
486599d
Add armor functions for streaming
lubux May 5, 2023
652a0d2
Update readme with fresh examples
lubux May 5, 2023
9a4c87d
Add bytes armor functions
lubux May 9, 2023
bcd5ef8
Update how time is handled
lubux May 12, 2023
7ca9459
Add decryption function for mime messages
lubux May 15, 2023
3b049e9
Move santize string functions to internal
lubux May 15, 2023
fcb45ca
Move mobile specific logic to mobile package
lubux May 15, 2023
942a63f
Bump to v3
lubux May 16, 2023
12f7edb
Add function to generate keys with a lifetime
lubux May 23, 2023
42c4102
Improve documentation and variable naming
lubux May 24, 2023
cc60945
Aumatically detect in decrypt/verify if input is armored or not
lubux May 24, 2023
b5e4083
Make the MIME decryption API more concise
lubux May 24, 2023
ebea67d
Update to latest version of the crypto refresh
lubux May 24, 2023
bc6e1b1
Update to go-crypto v2
lubux May 24, 2023
06ffdc8
Add support to verify multiple signatures
lubux May 24, 2023
e820400
Disable armor checksum and add exception for detached signature
lubux May 25, 2023
2ec53e5
Allow cleartext messages signed by multiple keys
lubux May 25, 2023
7726062
Update logic to the removal of salted hash headers in cleartext signa…
lubux May 30, 2023
0843833
Remove logic to generate default armor headers
lubux May 30, 2023
d1e5931
Fixes for compatibility with gomobile
marinthiercelin May 25, 2023
d1b4f48
Split Verify into VerfiyDetached and VerifyInline
lubux Jun 6, 2023
1571e96
Add method to constrain VerifyResult to a given signature creation ti…
lubux Jun 6, 2023
774c29b
Udpate readme to the new verify API
lubux Jun 6, 2023
d303cc9
Check for IsVerified in message details
lubux Jun 7, 2023
69c6a6e
Rename compression fields in custom profile
lubux Jun 7, 2023
e6988a2
Remove literal metadata from API
lubux Jun 8, 2023
053a13d
Introduce key generation handles instead of a method
lubux Jun 9, 2023
e792474
Rework profiles based on feedback
lubux Jun 12, 2023
ec9e884
Remove HasSignatureError method from verify result
lubux Jun 12, 2023
f6cba15
Rename VerifyKey to VerificationKey
lubux Jun 12, 2023
4c0338f
Fix issue with createVerifyResult if multiple signatures are present
lubux Jun 15, 2023
55500f6
Mark intended recipient subpacket as non-critical
lubux Jun 15, 2023
3889697
Ensure that cleartext verify returns the correct plaintext
lubux Jun 16, 2023
8b9e059
Update to the latest version go-crypto v2
lubux Jun 16, 2023
8df0e2d
Introduce encoding flag for armor/bytes
lubux Jun 19, 2023
52dc11c
Rename method names to be more consistent
lubux Jun 19, 2023
abe0a21
Ensure DecryptSessionKey returns an error for no key packet
lubux Jun 20, 2023
95b4d69
Adapt to cleartext Encode changes in go-crypto
lubux Jun 29, 2023
03a53cd
Update readme
lubux Jun 30, 2023
3e0db3d
Add godoc examples for encryption and decryption api
lubux Jun 30, 2023
ec59e7f
Fix detached signature enctyption with armored output
lubux Jun 30, 2023
74c19ff
More examples and documentation
lubux Jun 30, 2023
64a8272
Ensure key packets are written for detached signatures
lubux Jul 3, 2023
f8b0db3
Detached signatures should consider armor flag
lubux Jul 3, 2023
ab0bc56
More exmaples and documentation
lubux Jul 3, 2023
4d8f87c
Add lock key example
lubux Jul 3, 2023
37dbff4
Remove key generation clock from the PGPHandle
lubux Jul 3, 2023
7875975
Update to the new handling of key signatures in go-crypto
lubux Jun 30, 2023
b8997ad
Disable packet sequence check for encrypted detached signatures
lubux Jul 3, 2023
8868c61
More examples
lubux Jul 3, 2023
8fa95ac
Introduce a string method on the verified data result
lubux Jul 3, 2023
cb42b20
Improve documentation
lubux Jul 4, 2023
045ad49
Enable weak algorithm check
lubux Jul 6, 2023
ba0ca1a
Set version to alpha
lubux Jul 7, 2023
3bf16b7
Ensure that cleartext sign selects a valid key
lubux Jul 7, 2023
b607d39
Allow producing multiple singatures with a signing keyring
lubux Jul 7, 2023
52b19b0
Change enum types to int8 for gomobile compatibility
lubux Jul 10, 2023
4e9f29b
Remove signature expiration time check override
lubux Jul 11, 2023
df80799
Enforce utf8 when encrypting or signing with the text type
lubux Jul 17, 2023
9ac4c9b
feat: Transform messages in canonical form with type utf-8
lubux Jul 19, 2023
77149e3
feat(signature): Disable signature expired errors if verify time is zero
lubux Jul 20, 2023
b6ab035
fix: Read detached signature text data in canonical form
lubux Jul 20, 2023
17eafb3
Rename UTF8 method to Utf8 in all builders
lubux Aug 14, 2023
fd2f02d
feat: Add a new PGPSplitWriter type that buffers key packets internally
lubux Aug 14, 2023
d7f364a
feat: Change go-crypto to folder v2
lubux Aug 15, 2023
3a57929
fix: Change profile names to match rfc
lubux Aug 16, 2023
d4b00d3
fix(armor): No checksum in armor except in detached signatures
lubux Aug 17, 2023
e437598
feat(mobile): Create a buffering key packet PGPSplitWriter helper type
lubux Aug 17, 2023
e12c1fa
feat: Reject cleartext messages with trailing text
lubux Aug 17, 2023
88da457
fix(profile): Remove AEAD from GnuPG profile
lubux Aug 18, 2023
33cc3fd
feat(mobile): Introduce type implementing PGPSplitReader for mobile
lubux Aug 24, 2023
512f9b5
feat: Update to the latest version of go-crypto
lubux Aug 31, 2023
ce1c912
feat(crypto): Allow multiple session keys in decryption handle
lubux Sep 14, 2023
1911666
feat(crypto): Allow multiple passwords in decryption handle
lubux Sep 14, 2023
1d9154a
feat(crypto): Make strict openpgp message parsing an option
lubux Sep 26, 2023
8e7987c
fix(crypto): Only rely on SignatureCandidates for creating VerifyResult
lubux Sep 26, 2023
0eee66e
feat(crypto): Change signature selection in VerifyResult
lubux Sep 26, 2023
f64620a
chore: Update to latest go-crypto
lubux Sep 26, 2023
b7e9e7e
feat(crypto): Add serialized signature method to VerifyResult
lubux Sep 26, 2023
077ccad
feat(crypto): Allow to set compression algorithm on encryption handle
lubux Sep 27, 2023
302770d
feat(crypto): Allow to include external signatures in encryption
lubux Sep 28, 2023
48f6c82
feat(crypto): Allow to set a seperate encryption time on the encrypti…
lubux Sep 28, 2023
2c67335
fix: Ensure that the preferred signing hash is included in the key
lubux Sep 29, 2023
f6829bd
fix: Do not show low level errors in private key decryption
lubux Sep 29, 2023
6ae166a
feat: Make strict message parsing default and add option to disable i…
lubux Oct 2, 2023
6a740b8
feat: Update to latest go-crypto
lubux Oct 5, 2023
4c1ed81
feat: Add profiles to decryption/verify handle and refactor profile d…
lubux Oct 5, 2023
6033dde
feat(key): Add NewKeyFromReaderExplicit to parse key without encoding…
lubux Oct 5, 2023
e04f2de
fix(crypto): Reset stream when decrypting with multiple passwords
lubux Oct 9, 2023
0f92022
feat(crypto): Allow to disable automatic reversal of canonical form i…
lubux Oct 10, 2023
99c4bcd
fix: Ensure profile is used for configuration in verify
lubux Oct 10, 2023
7472808
fix(crytpo): Session key encryption must consider config
lubux Oct 10, 2023
96ded8f
feat: Allow to disable intended recipients in a profile
lubux Oct 12, 2023
f079ca6
fix: Do not allow SED packets in decrypt with session key
lubux Oct 27, 2023
27bd377
fix(internal): Ensure that utf-8 sanatizer works for splited runes
lubux Oct 31, 2023
f59323b
feat: Update to refactored go-crypto v2
lubux Nov 22, 2023
308cc72
refactor: Pass with linter
lubux Nov 23, 2023
8db857a
refactor: Make linter happy
lubux Nov 23, 2023
2e89c03
docs: Improve documentation across all packages
lubux Nov 23, 2023
203708b
fix(readme): Update link to point to ProtonMail/go-crpyto v2
lubux Nov 23, 2023
08ed23f
Apply doc suggestions from code review
lubux Nov 30, 2023
c5b533b
Apply doc suggestions from code review
lubux Nov 30, 2023
a51b6f3
Fix comment issue in crypto/message.go
lubux Nov 30, 2023
de438d5
docs(crypto): Add go-mobile info to Writer and WriteCloser interface
lubux Nov 30, 2023
a1cecb4
feat(decrypt): Allow to decrypt with password and keys at the same time
lubux Nov 30, 2023
1de51b8
docs: Add missing comments in exported functions
lubux Nov 30, 2023
a603739
feat(encrypt): Allow encryption with keys and password at the same time
lubux Nov 30, 2023
58b77e1
docs(key): Update comments of generateKey and lock
lubux Nov 30, 2023
c09a047
docs(message): Be more precise about the packet types
lubux Nov 30, 2023
b58421d
fix(sk): Ignore v6 flag in session key constructor function
lubux Nov 30, 2023
6e7b6a6
fix(verify): Fix error message for discard failure
lubux Nov 30, 2023
e34fcf9
fix(verify): Remove duplicate error check
lubux Nov 30, 2023
fdb3115
fix(mime): Update error message
lubux Nov 30, 2023
c9aee46
refactor(keys): Improve keys test
lubux Dec 1, 2023
2edec12
feat(keyring): Add time argument to CountDecryptionEntities
lubux Dec 1, 2023
b47712b
chore(keyring): Remove commented test
lubux Dec 1, 2023
1ed2251
Update docs crypto/message.go
lubux Dec 1, 2023
95e2906
refactore(interop): Annotate data variables as constants
lubux Dec 1, 2023
fa0088e
docs(readme): Add go-mobile support description from v2
lubux Dec 1, 2023
dbfed3f
feat(test): Add more failure test cases
lubux Dec 1, 2023
e7ed109
docs: Serveral small doc fixes
lubux Dec 1, 2023
50314e6
fix(gomobile): Remove Profile interface and only allow profile.Custom…
lubux Dec 1, 2023
795824a
feat(profile): Integrate profile features required internally
lubux Dec 1, 2023
ca49b6b
feat(go-mobile): Offer method alternatives for go-mobile clients
lubux Dec 4, 2023
08663f7
fix(sessionkey): Fix error message
lubux Dec 6, 2023
1814658
chore(armor): Change package name in error messages
lubux Dec 7, 2023
0a14511
Apply suggestions from code review
lubux Dec 7, 2023
5ce2b61
Apply suggestions from code review
lubux Dec 7, 2023
948052e
chore(mime): Rename package in error message
lubux Dec 7, 2023
7173dce
fix(signature): Do not ignore verify errors in signature tests
lubux Dec 7, 2023
56da32c
fix(signature): wrap error from go-crypto
lubux Dec 7, 2023
d781b62
refactor(signature): Check hash allowed explicitly with a set
lubux Dec 7, 2023
58a5e5a
fix(message): Do not ignore error in NewPGPMessage constructor
lubux Dec 7, 2023
67870f2
refactor(encryption): Rename isPGPMessageWriter to castToPGPSplitWriter
lubux Dec 7, 2023
085de72
fix(encryption): Fix wrong comparison in encryption handle validate
lubux Dec 7, 2023
1037cfe
chore(decryption): Return nil instead of err
lubux Dec 7, 2023
0a4f277
refactor: Replace elseif chains with switch statements
lubux Dec 7, 2023
3aef266
chore: Resolve rebase issues
lubux Dec 7, 2023
a194eb5
ci: Update to gopenpgp v3
lubux Dec 7, 2023
4da9aaa
chore: go1.15 compatibility
lubux Dec 7, 2023
21082b9
feat: Offer non-cloning options for non-mobile clients
lubux Dec 8, 2023
f8477a2
fix(profile): Ensure all option flags are applied
lubux Dec 12, 2023
1a27e5a
fix: Address reading issues with v5 signatures
lubux Jan 5, 2024
bf91181
fix(key): Key parsing should consider all encoding enums
lubux Jan 5, 2024
043dba6
feat: Add getter to access key version directly
lubux Jan 9, 2024
09723bb
Fix rune decode error check in utf8 checker
lubux Jan 9, 2024
8938651
fix: Improve performance of the streaming utf8 checker
lubux Jan 10, 2024
4340357
chore: Fix linter issues
lubux Jan 10, 2024
621ed39
ci: Fix go-mobile build
lubux Jan 10, 2024
1b1fd04
chore: Update to go 1.17 and tagged go-crypto
lubux Jan 18, 2024
286eda1
refactor: Replace deprecated ioutil commands
lubux Jan 18, 2024
dcb604b
fix: Update CI to go 1.17 changes
lubux Jan 18, 2024
e18950a
chore: Prepare pre-relese v3.0.0-alpha.0
lubux Jan 18, 2024
3ee215d
feat(key): Allow to override algorithm in key generation
lubux Feb 9, 2024
7c72a45
feat: Always create signature verification result (#273)
lubux Mar 20, 2024
6459b4f
chore: FIx rebase issue
lubux Mar 20, 2024
099a8d6
chore: Add missing changelog and GetNumberOfKeysPackets from rebase
lubux Mar 20, 2024
0df30bb
fix: Address linter issues
lubux Mar 20, 2024
a8e8e93
chore: Prepare pre-relese v3.0.0-alpha.1
lubux Mar 20, 2024
5c1623a
Add parsing and serializing interfaces for keyrings
wussler Apr 8, 2024
d221a4a
feat: Allow detached plaintext signatures in encryption/decryption ha…
lubux Apr 12, 2024
a55a5f2
Prepare release v3.0.0-alpha.2
lubux Apr 12, 2024
5720941
feat(armor): Rework armor checksum handling (#284)
lubux Jun 14, 2024
f063634
ci: Fix ios build to use available xcode version
lubux Jun 14, 2024
460f111
ci: Update inertop-test-suite to latest version
lubux Jun 14, 2024
835d4b8
ci: Determine gosop version branch automatically
lubux Jun 14, 2024
61e06e6
ci: Interoptest-suite must compare to target
lubux Jun 14, 2024
e464019
Update README.md
lubux Jun 21, 2024
9133d5e
chore: Update go-crypto to latest version
lubux Jun 25, 2024
a63e456
chore: Prepare release 3.0.0-alpha.3
lubux Jun 25, 2024
83d20e8
chore: Prepare release 3.0.0-alpha.4
lubux Jul 16, 2024
3e723ea
Remove preset profile names and refactor profiles (#288)
lubux Jul 17, 2024
d336d6e
Update go-crypto
twiss Jul 18, 2024
c09849a
chore: Update release 3.0.0-alpha.4
lubux Jul 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .github/actions/build-gosop/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ name: 'build-gosop'
description: 'Build gosop from the current branch'

inputs:

gopenpgp-ref:
description: 'gopenpgp branch tag or commit to build from'
required: true
Expand All @@ -21,6 +20,12 @@ runs:
with:
ref: ${{ inputs.gopenpgp-ref }}
path: gopenpgp
- name: Set env
run: echo "GOSOP_BRANCH_REF=$(./.github/test-suite/determine_gosop_branch.sh)" >> $GITHUB_ENV
shell: bash
- name: Print gosop branch
run: echo ${{ env.GOSOP_BRANCH_REF}}
shell: bash
# Build gosop
- name: Set up latest golang
uses: actions/setup-go@v3
Expand All @@ -30,6 +35,7 @@ runs:
uses: actions/checkout@v3
with:
repository: ProtonMail/gosop
ref: ${{ env.GOSOP_BRANCH_REF}}
path: gosop
- name: Cache go modules
uses: actions/cache@v3
Expand Down
6 changes: 4 additions & 2 deletions .github/test-suite/build_gosop.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
VERSION=$(awk '/^module github.com\/ProtonMail\/gopenpgp\/v[0-9]+/ {print $NF}' gopenpgp/go.mod | awk -F'v' '{print $2}')

cd gosop
echo "replace github.com/ProtonMail/gopenpgp/v2 => ../gopenpgp" >> go.mod
go get github.com/ProtonMail/gopenpgp/v2/crypto
echo "replace github.com/ProtonMail/gopenpgp/v${VERSION} => ../gopenpgp" >> go.mod
go get github.com/ProtonMail/gopenpgp/v${VERSION}/crypto
go build .
8 changes: 2 additions & 6 deletions .github/test-suite/config.json.template
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"path": "__GOSOP_BRANCH__"
},
{
"id": "gosop-main",
"path": "__GOSOP_MAIN__"
"id": "gosop-target",
"path": "__GOSOP_TARGET__"
},
{
"path": "__SQOP__"
Expand All @@ -17,10 +17,6 @@
{
"path": "__SOP_OPENPGPJS__"
},
{
"id": "gosop-v2",
"path": "__GOSOP_V2__"
},
{
"path": "__RNP_SOP__"
}
Expand Down
7 changes: 7 additions & 0 deletions .github/test-suite/determine_gosop_branch.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
VERSION=$(awk '/^module github.com\/ProtonMail\/gopenpgp\/v[0-9]+/ {print $NF}' gopenpgp/go.mod | awk -F'v' '{print $2}')

if [ "$VERSION" -eq 3 ]; then
echo "gosop-gopenpgp-v3"
else
echo "main"
fi
7 changes: 3 additions & 4 deletions .github/test-suite/prepare_config.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
CONFIG_TEMPLATE=$1
CONFIG_OUTPUT=$2
GOSOP_BRANCH=$3
GOSOP_MAIN=$4
GOSOP_TARGET=$4
cat $CONFIG_TEMPLATE \
| sed "s@__GOSOP_BRANCH__@${GOSOP_BRANCH}@g" \
| sed "s@__GOSOP_MAIN__@${GOSOP_MAIN}@g" \
| sed "s@__GOSOP_TARGET__@${GOSOP_TARGET}@g" \
| sed "s@__SQOP__@${SQOP}@g" \
| sed "s@__GPGME_SOP__@${GPGME_SOP}@g" \
| sed "s@__SOP_OPENPGPJS__@${SOP_OPENPGPJS}@g" \
| sed "s@__GOSOP_V2__@${GOSOP_DIR_V2}/gosop@g" \
| sed "s@__SOP_OPENPGPJS__@${SOP_OPENPGPJS_V2}@g" \
| sed "s@__RNP_SOP__@${RNP_SOP}@g" \
> $CONFIG_OUTPUT
4 changes: 2 additions & 2 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
branches: [ main, v3 ]

jobs:
build:
name: Build library for Android with gomobile
runs-on: ubuntu-latest
runs-on: ubuntu-20.04

steps:
- name: Set up JDK 1.8
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
branches: [ main, v3 ]

jobs:
test:
Expand Down Expand Up @@ -36,7 +36,7 @@ jobs:

- name: Test
run: go test -v -race ./...

lint:
name: Lint
runs-on: ubuntu-latest
Expand All @@ -48,4 +48,4 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.50.1
version: v1.54.2
9 changes: 3 additions & 6 deletions .github/workflows/ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
branches: [ main, v3 ]

jobs:
build:
name: Build library for iOS with gomobile
runs-on: macos-latest

steps:
- name: Set up xcode 14.2
- name: Set up xcode 14.3
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: 14.2
xcode-version: 14.3
id: xcode

- name: Set up Go 1.x
Expand All @@ -31,9 +31,6 @@ jobs:
env:
platform: ${{ 'iOS Simulator' }}
run: |
for d in $ANDROID_NDK_HOME/../23*; do
ANDROID_NDK_HOME=$d
done
./build.sh apple
find dist

Expand Down
46 changes: 23 additions & 23 deletions .github/workflows/sop-test-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: SOP interoperability test suite

on:
pull_request:
branches: [ main ]
branches: [ main, v3 ]

jobs:

Expand All @@ -23,49 +23,49 @@ jobs:
name: gosop-${{ github.sha }}
path: ./gosop-${{ github.sha }}

build-gosop-main:
name: Build gosop from main
build-gosop-target:
name: Build gosop from target
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build gosop from branch
uses: ./.github/actions/build-gosop
with:
gopenpgp-ref: main
binary-location: ./gosop-main
gopenpgp-ref: ${{ github.base_ref }}
binary-location: ./gosop-target
# Upload as artifact
- name: Upload gosop-main artifact
- name: Upload gosop-target artifact
uses: actions/upload-artifact@v3
with:
name: gosop-main
path: ./gosop-main
name: gosop-target
path: ./gosop-target


test-suite:
name: Run interoperability test suite
runs-on: ubuntu-latest
container:
image: ghcr.io/protonmail/openpgp-interop-test-docker:v1.1.4
image: ghcr.io/protonmail/openpgp-interop-test-docker:v1.1.7
credentials:
username: ${{ github.actor }}
password: ${{ secrets.github_token }}
needs:
- build-gosop
- build-gosop-main
- build-gosop-target
steps:
- name: Checkout
uses: actions/checkout@v3
# Fetch gosop from main
- name: Download gosop-main
# Fetch gosop from target
- name: Download gosop-target
uses: actions/download-artifact@v3
with:
name: gosop-main
# Test gosop-main
- name: Make gosop-main executable
run: chmod +x gosop-main
- name: Print gosop-main version
run: ./gosop-main version --extended
name: gosop-target
# Test gosop-target
- name: Make gosop-target executable
run: chmod +x gosop-target
- name: Print gosop-target version
run: ./gosop-target version --extended
# Fetch gosop from branch
- name: Download gosop-branch
uses: actions/download-artifact@v3
Expand All @@ -80,7 +80,7 @@ jobs:
run: ./gosop-branch version --extended
# Run test suite
- name: Prepare test configuration
run: ./.github/test-suite/prepare_config.sh $CONFIG_TEMPLATE $CONFIG_OUTPUT $GITHUB_WORKSPACE/gosop-branch $GITHUB_WORKSPACE/gosop-main
run: ./.github/test-suite/prepare_config.sh $CONFIG_TEMPLATE $CONFIG_OUTPUT $GITHUB_WORKSPACE/gosop-branch $GITHUB_WORKSPACE/gosop-target
env:
CONFIG_TEMPLATE: .github/test-suite/config.json.template
CONFIG_OUTPUT: .github/test-suite/config.json
Expand All @@ -104,8 +104,8 @@ jobs:
name: test-suite-results.html
path: .github/test-suite/test-suite-results.html

compare-with-main:
name: Compare with main
compare-with-target:
name: Compare with target
runs-on: ubuntu-latest
needs: test-suite
steps:
Expand All @@ -117,9 +117,9 @@ jobs:
with:
name: test-suite-results.json
- name: Compare with baseline
uses: ProtonMail/openpgp-interop-test-analyzer@5d7f4b6868ebe3bfc909302828342c461f5f4940
uses: ProtonMail/openpgp-interop-test-analyzer@v2.0.0
with:
results: ${{ steps.download-test-results.outputs.download-path }}/test-suite-results.json
output: baseline-comparison.json
baseline: gosop-main
baseline: gosop-target
target: gosop-branch
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ vendor
*.html
reports
.idea
v2
v3
21 changes: 18 additions & 3 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ linters-settings:
- BUG
- FIXME
funlen:
lines: 100
lines: 150
statements: 80
cyclop:
# the minimal code complexity to report
max-complexity: 20
max-complexity: 26
gocognit:
min-complexity: 45

Expand All @@ -18,6 +18,19 @@ issues:
- Using the variable on range scope `tt` in function literal
- GetJsonSHA256Fingerprints should be GetJSONSHA256Fingerprints
- ST1003 # CamelCase variables; see constants/cipher.go
- missing output for example, go test can't validate it
- variable 'hasExpiredEntity' is only used in the if-statement
exclude-rules:
- path: crypto/key_clear.go
text: "SA1019"
- path: crypto/crypto_example_test.go
text: "G101: Potential hardcoded credentials"
- path: crypto/encrypt_decrypt_test.go
text: "Using the variable on range scope"
- path: crypto/encrypt_decrypt_err_test.go
text: "Using the variable on range scope"
- path: crypto/sign_verify_test.go
text: "Using the variable on range scope"

linters:
enable-all: true
Expand Down Expand Up @@ -47,4 +60,6 @@ linters:
- forcetypeassert # Forces to assert types in tests
- nonamedreturns # Disallows named returns
- exhaustruct # Forces all structs to be named
- nosnakecase # Disallows snake case
- nosnakecase # Disallows snake case
- depguard
- nestif
49 changes: 41 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,22 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.8.0-alpha.1] 2024-04-09
## [3.0.0-alpha.4] 2024-07-18
### Changed
- Update go-crypto to `1.1.0-alpha.4`.
- Remove logic to get a profile by name.
- Reduce preset profiles to `Default`, `RFC4880`, and `RFC9580`.
- Update go-crypto to check signature details of binding signatures.

## [3.0.0-alpha.3] 2024-06-25
### Added
- API to armor data with the option to remove the checksum

### Changed
- All armor functions append a checksum per default for compatibility with certain libraries although the crypto-refresh advises not to.
- `Encryption` and `Sign` handle now append a checksum when armoring. If the produced OpenPGP packets are crypto-refresh packets, the checksum is not appended as mandated by the crypto-refresh.

## [3.0.0-alpha.2] 2024-04-12
### Added
- API to serialize KeyRings to binary data:
```go
Expand All @@ -15,15 +29,34 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
```go
func NewKeyRingFromBinary(binKeys []byte) (*KeyRing, error)
```
- API to a create/verify plaintext detached signatures on the encryption/decryption handle instead of just encrypted detached signatures.

## [2.8.0-alpha.0] 2024-02-28
## [3.0.0-alpha.1] 2024-03-20
### Added
- Allow to override algorithm in key generation
- Always create a verification result on signature verification

### Added
- Adds support for the OpenPGP crypto-refresh by updating the go-crypto dependency to `v1.1.0-alpha.1`.
- Adapts the session key logic to handle PKESK/SKESK v6 packets without an algorithm attached
- Updates the min go version to `1.17` as required by go-crypto `v1.1.0-alpha.1`.
- Update the cricl dependency to `1.3.7` matching go-crypto.
### Changed
- Update ProtonMail/go-crypto to 1.1.0-alpha.2

## [3.0.0-alpha.0] 2024-01-18
### Added
- New simplified API that is not backward compatible.
- Full support for the crypto refresh.
- Improved interoperability with other OpenPGP libraries.
- Streaming support for all operations.
- Introduces profiles for OpenPGP customization.
- More documentation and examples.

### Changed
- Mobile specific code is moved to the `mobile` package.
- Mime specific code is moved to the `mime` package.
- Replaces the go-crypto v1 API with the v2 API.

### Removed
- The `helper` package, use the crypto package with the new API instead.
- `subtle` and `models` package.
- Time management code for retrieving and setting timestamps.

## [2.7.5] 2023-31-01

Expand All @@ -50,7 +83,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Ensure that `(SessionKey).Decrypt` functions return an error if no integrity protection is present in the encrypted input. To protect SEIPDv1 encrypted messages, SED packets must not be allowed in decryption.

## [2.7.3] 2023-08-28
## Added
### Added
- Add `helper.QuickCheckDecrypt` function to the helper package. The function allows to check with high probability if a session key can decrypt a SEIPDv1 data packet given its 24-byte prefix.

## [2.7.2] 2023-07-17
Expand Down
Loading
Loading