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

in-toto-run implementation #56

Merged
Merged
Show file tree
Hide file tree
Changes from 33 commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
14a8de0
use more specific names
shibumi Jun 23, 2020
4969540
implement VerifyEd25519Signature func
shibumi Jun 23, 2020
45a8e93
add LoadEd25519PublicKey func
shibumi Jun 23, 2020
76f9f94
add ParseEd25519FromPublicJSON func
shibumi Jun 23, 2020
c6cb9c0
add additional error checks
shibumi Jun 23, 2020
ae5e82d
add LoadPrivateKey func for ed25519 and more tests
shibumi Jun 26, 2020
d868be7
mention encrypted private keys in comments
shibumi Jun 26, 2020
f54d2e5
implement Parse/Load RSA private key
shibumi Jun 26, 2020
9b5413f
add test function for ParseRSAPrivateKey
shibumi Jun 26, 2020
66e49b8
add GenerateRSASignature
shibumi Jun 26, 2020
fe86f29
fix random source for rsa.SignPSS and add test function
shibumi Jun 26, 2020
c8ced5b
add verification for the generated signature
shibumi Jun 26, 2020
8253556
add a first draft for signing links in InTotoRun
shibumi Jun 26, 2020
ed01d7b
add new validatePrivateKey function + add key id to pub key
shibumi Jul 5, 2020
17c679b
add more test case + table tests to TestInTotoRun
shibumi Jul 5, 2020
7413391
add more model test cases
shibumi Jul 5, 2020
d5b38f7
make sure to sign the link data + tests
shibumi Jul 5, 2020
17dc020
implement GenerateKeyId + remove keyId from pubkeys
shibumi Jul 6, 2020
07ef081
use generateKeyId in LoadRSA functions
shibumi Jul 6, 2020
5f46880
Infer RSA Public Key from Private Key
shibumi Jul 7, 2020
7c1074a
trim spaces and newlines around PEM block
shibumi Jul 7, 2020
dd2bd38
fix documentation
shibumi Jul 7, 2020
2633831
Add generic LoadKey function
shibumi Jul 8, 2020
b8a5023
change missing test cases
shibumi Jul 8, 2020
fa002a2
enhance documentation + more readable pem parser section
shibumi Jul 9, 2020
e924233
move parsing to ParseKey function + enhance error handling
shibumi Jul 9, 2020
1c2415e
add more generic GenerateSignature function
shibumi Jul 9, 2020
65a734f
cleanup tests
shibumi Jul 9, 2020
5ee4dca
implement generic VerifySignature
shibumi Jul 13, 2020
7b2d7fa
add valid ed25519 PEM key testdata
shibumi Jul 13, 2020
885c743
fix InTotoRun + fix test with new signature
shibumi Jul 13, 2020
ec46fd0
remove bob test data
shibumi Jul 13, 2020
81f0894
store ed25519 keys as hex encoded strings
shibumi Jul 13, 2020
cc2a58e
Add comment for dropping rest of PEM block parsing
shibumi Jul 21, 2020
c31d709
remove comment that we do not support signing links
shibumi Jul 21, 2020
1ac76f0
remove outdated test
shibumi Jul 21, 2020
a2825c5
remove outdated keylib test cases
shibumi Jul 21, 2020
0a28c13
Add new test data + description
shibumi Jul 21, 2020
0acd97f
Add tests for new generic functions
shibumi Jul 21, 2020
e601861
add more tests
shibumi Jul 22, 2020
4379ac5
fix spelling
shibumi Jul 22, 2020
ad07bd6
fix windows path error
shibumi Jul 22, 2020
d71ce00
Add description for generating key files
shibumi Jul 23, 2020
01da883
add test for dumping and loading a signed metablock
shibumi Jul 23, 2020
e43522d
try to fix unmarshalling type errors
shibumi Jul 24, 2020
adfdd99
Revert "try to fix unmarshalling type errors"
shibumi Jul 25, 2020
455f141
Fix inconsistent link dumping/loading
shibumi Jul 25, 2020
a4a40ae
add doc strings
shibumi Jul 27, 2020
84c9874
add ecdsa support
shibumi Jul 28, 2020
1b7c8f5
Remove unnecessary byte transformations
shibumi Jul 28, 2020
5b8743d
add missing case for ecdsa public key
shibumi Jul 29, 2020
a275a25
Fix ecdsa Signature
shibumi Jul 29, 2020
4910972
Complete Rewrite of keylib_test.go
shibumi Jul 29, 2020
79383c9
implement proper ecdsa signature encoding
shibumi Jul 30, 2020
af0cf4c
increase test coverage
shibumi Jul 31, 2020
bd1a6b6
add ecdsa support for Metablock.Sign()
shibumi Aug 2, 2020
2d7b3d2
Add new errors to model
shibumi Aug 2, 2020
3a3d274
cover new key object validation + more key lib tests
shibumi Aug 2, 2020
089dd4c
remove frank.ec
shibumi Aug 6, 2020
e22b3cd
remove switch block in Metablock.Sign
shibumi Aug 6, 2020
2db25b7
remove carol-invalid
shibumi Aug 6, 2020
f4ee8ae
add more documentation
shibumi Aug 6, 2020
f9e328a
use Go 1.13's IsZero() for checking for an uninitialized Key
shibumi Aug 6, 2020
2a7e225
Use Go 1.13 Error handling
shibumi Aug 6, 2020
5bce89f
enhance documentation
shibumi Aug 7, 2020
16a79ec
use constant strings for keytypes
shibumi Aug 7, 2020
b3da496
implement scheme and keytype checking
shibumi Aug 7, 2020
c426bcb
change last string to constant
shibumi Aug 7, 2020
6cb021a
implement a decodeAndParse function to minimize copy-paste code
shibumi Aug 7, 2020
86d191d
call validateKey before signing signable data and validating signatures
shibumi Aug 8, 2020
52fe163
use type assertion in GenerateSignature/ValidateSignature
shibumi Aug 12, 2020
4ce8e4c
introduce constants for the schemes
shibumi Aug 12, 2020
49ee808
use panic for the default switch cases
shibumi Aug 12, 2020
e338568
add Scheme checking in Sign + Verify
shibumi Aug 12, 2020
3c4832c
unexport all functions in Keylib except Load,Sign,Verify
shibumi Aug 12, 2020
3dddc66
set correct ecdsa scheme
shibumi Aug 13, 2020
075e168
call panic for never reached default cases
shibumi Aug 14, 2020
236acb8
Fix various strings and documentation
shibumi Aug 14, 2020
111dd2f
add todo for subsetCheck function
shibumi Aug 14, 2020
5d51843
Rename TestSetKeyComponents to TestSetKeyComponentsErrors
shibumi Aug 14, 2020
d1bf3c1
remove misleading support for ecdsa-sha2-nistp384
shibumi Aug 15, 2020
64b5325
implement validatePublicKey + tests
shibumi Aug 16, 2020
fa94594
keyIdHashAlgorithms is now optional + fix tests
shibumi Aug 17, 2020
1ac47be
add comment about ecdsa interoperability
shibumi Aug 17, 2020
c25b937
fix deadbeef test
shibumi Aug 17, 2020
70fdec2
Remove done items from README todo
lukpueh Aug 20, 2020
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
2 changes: 1 addition & 1 deletion in_toto/examples_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func ExampleInTotoVerify() {
// InTotoVerify. The layout represents the root of trust so it is a good
// idea to sign it using multiple keys.
var pubKey Key
err := pubKey.LoadPublicKey(LayoutKeyPath)
err := pubKey.LoadKey(LayoutKeyPath, "rsassa-pss-sha256", []string{"sha256", "sha512"})
if err != nil {
fmt.Printf("Unable to load public key: %s", err)
}
Expand Down
Loading