-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
115 additions
and
26 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,31 @@ | ||
rm ./scripts/diagnostic/* | ||
echo '{"message":"⌛ My lungs taste the air of Time Blown past falling sands"}' > ./scripts/diagnostic/message.json | ||
rm ./tests/fixtures/* | ||
echo '{"message":"⌛ My lungs taste the air of Time Blown past falling sands"}' > ./tests/fixtures/message.json | ||
npm run build | ||
|
||
# signing keys | ||
npm run -s transmute -- jose keygen --alg ES256 > ./scripts/diagnostic/private.sig.jwk.json | ||
npm run -s transmute -- jose keypub ./scripts/diagnostic/private.sig.jwk.json > ./scripts/diagnostic/public.sig.jwk.json | ||
npm run -s transmute -- jose keygen --alg ES256 > ./tests/fixtures/private.sig.jwk.json | ||
npm run -s transmute -- jose keypub ./tests/fixtures/private.sig.jwk.json > ./tests/fixtures/public.sig.jwk.json | ||
|
||
# encryption keys | ||
npm run -s transmute -- jose keygen --alg ECDH-ES+A128KW --crv P-384 > ./scripts/diagnostic/private.enc.jwk.json | ||
npm run -s transmute -- jose keypub ./scripts/diagnostic/private.enc.jwk.json > ./scripts/diagnostic/public.enc.jwk.json | ||
npm run -s transmute -- jose keygen --alg ECDH-ES+A128KW --crv P-384 > ./tests/fixtures/private.enc.jwk.json | ||
npm run -s transmute -- jose keypub ./tests/fixtures/private.enc.jwk.json > ./tests/fixtures/public.enc.jwk.json | ||
|
||
# attached | ||
npm run -s transmute -- jose sign ./scripts/diagnostic/private.sig.jwk.json ./scripts/diagnostic/message.json > ./scripts/diagnostic/message.signature.json | ||
npm run -s transmute -- jose verify ./scripts/diagnostic/public.sig.jwk.json ./scripts/diagnostic/message.signature.json --output ./scripts/diagnostic/message.verified.json > ./scripts/diagnostic/message.signature.verified.json | ||
npm run -s transmute -- jose sign ./tests/fixtures/private.sig.jwk.json ./tests/fixtures/message.json > ./tests/fixtures/message.signature.json | ||
npm run -s transmute -- jose verify ./tests/fixtures/public.sig.jwk.json ./tests/fixtures/message.signature.json --output ./tests/fixtures/message.verified.json > ./tests/fixtures/message.signature.verified.json | ||
|
||
# detached | ||
npm run -s transmute -- jose sign ./scripts/diagnostic/private.sig.jwk.json ./scripts/diagnostic/message.json --detached > ./scripts/diagnostic/message.signature.detached.json | ||
npm run -s transmute -- jose verify ./scripts/diagnostic/public.sig.jwk.json ./scripts/diagnostic/message.signature.detached.json ./scripts/diagnostic/message.json --detached> ./scripts/diagnostic/message.signature.detached.verified.json | ||
npm run -s transmute -- jose sign ./tests/fixtures/private.sig.jwk.json ./tests/fixtures/message.json --detached > ./tests/fixtures/message.signature.detached.json | ||
npm run -s transmute -- jose verify ./tests/fixtures/public.sig.jwk.json ./tests/fixtures/message.signature.detached.json ./tests/fixtures/message.json --detached> ./tests/fixtures/message.signature.detached.verified.json | ||
|
||
# detached compact | ||
npm run -s transmute -- jose sign ./scripts/diagnostic/private.sig.jwk.json ./scripts/diagnostic/message.json --detached --compact > ./scripts/diagnostic/message.signature.detached.compact.jws | ||
npm run -s transmute -- jose verify ./scripts/diagnostic/public.sig.jwk.json ./scripts/diagnostic/message.signature.detached.compact.jws ./scripts/diagnostic/message.json --detached --compact > ./scripts/diagnostic/message.signature.detached.compact.jws.verified.json | ||
npm run -s transmute -- jose sign ./tests/fixtures/private.sig.jwk.json ./tests/fixtures/message.json --detached --compact > ./tests/fixtures/message.signature.detached.compact.jws | ||
npm run -s transmute -- jose verify ./tests/fixtures/public.sig.jwk.json ./tests/fixtures/message.signature.detached.compact.jws ./tests/fixtures/message.json --detached --compact > ./tests/fixtures/message.signature.detached.compact.jws.verified.json | ||
|
||
# encrypt | ||
npm run -s transmute -- jose encrypt ./scripts/diagnostic/public.enc.jwk.json ./scripts/diagnostic/message.json --enc A128GCM > ./scripts/diagnostic/message.ciphertext.json | ||
npm run -s transmute -- jose decrypt ./scripts/diagnostic/private.enc.jwk.json ./scripts/diagnostic/message.ciphertext.json --output ./scripts/diagnostic/message.plaintext.json > ./scripts/diagnostic/message.decrypted.json | ||
npm run -s transmute -- jose encrypt ./tests/fixtures/public.enc.jwk.json ./tests/fixtures/message.json --enc A128GCM > ./tests/fixtures/message.ciphertext.json | ||
npm run -s transmute -- jose decrypt ./tests/fixtures/private.enc.jwk.json ./tests/fixtures/message.ciphertext.json --output ./tests/fixtures/message.plaintext.json > ./tests/fixtures/message.decrypted.json | ||
|
||
# encrypt compact | ||
npm run -s transmute -- jose encrypt ./scripts/diagnostic/public.enc.jwk.json ./scripts/diagnostic/message.json --enc A128GCM --compact > ./scripts/diagnostic/message.ciphertext.compact.jwe | ||
npm run -s transmute -- jose decrypt ./scripts/diagnostic/private.enc.jwk.json ./scripts/diagnostic/message.ciphertext.compact.jwe --output ./scripts/diagnostic/message.plaintext.json --compact > ./scripts/diagnostic/message.decrypted.json | ||
npm run -s transmute -- jose encrypt ./tests/fixtures/public.enc.jwk.json ./tests/fixtures/message.json --enc A128GCM --compact > ./tests/fixtures/message.ciphertext.compact.jwe | ||
npm run -s transmute -- jose decrypt ./tests/fixtures/private.enc.jwk.json ./tests/fixtures/message.ciphertext.compact.jwe --output ./tests/fixtures/message.plaintext.json --compact > ./tests/fixtures/message.decrypted.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
eyJlbmMiOiJBMTI4R0NNIiwiYWxnIjoiRUNESC1FUytBMTI4S1ciLCJlcGsiOnsieCI6ImZ6NVBLUngwNG1FX2ZBX2NBYWNEY0c3N3p5U1h5WGJ3RTZaSU9MQlYyUWtyUFNGMDBxVVdETEFCQ2MtMWIxWXAiLCJjcnYiOiJQLTM4NCIsImt0eSI6IkVDIiwieSI6Il9IbUczQjRYaGxTbThJWDVqZHRWTHRXZ0RPWDJlU0lTWC03cU9PUkhVMkZBU3luRUZ1c3lyZGpTRm56UGFCbnUifX0.hQpufFxzUrZYiGg_QkWXfEj8GlR-AolX.Hfzg7NgxJyXN1Cli.U5X-1BrqQge7fC3_YHmc-s7Yyc0u3MWN1hgiz4XCxhaJfafqODMWJHuaJooNENoxFO0zz2zck1Ch7jHKCVZyUaEEqaJgd5pLbm8.HjDtvd4vDVECs3e9BZpfvw |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"ciphertext": "zcTReJ_ldyUT0KheEePLwEU1zESl62AnZBAJ-c2u6XL3AI99uK5IlFeg2KWo1ROJUjzObeS-DSNiVrQDUFzEOjNxhcya073tExU", | ||
"iv": "hysHgzpaW_LGJ4Ws", | ||
"recipients": [ | ||
{ | ||
"encrypted_key": "lc5THKeZ0f811h8sSuLpw_JEzsHBbr48", | ||
"header": { | ||
"alg": "ECDH-ES+A128KW" | ||
} | ||
} | ||
], | ||
"tag": "L7HUNLLer8W7zbIgk3w1ag", | ||
"protected": "eyJlbmMiOiJBMTI4R0NNIiwiZXBrIjp7IngiOiJzYlF0eUhXd1F2V0NBdl9mRVdEVFpPLURrOWI2QnpNd3JSYnRUNnJUUUdOM0FhTnBaekdlVGJia3RQajJGMDcyIiwiY3J2IjoiUC0zODQiLCJrdHkiOiJFQyIsInkiOiIzajJCYlIyMWJLT0pUSlVoSWFHRkI4U1lRX0pwbW9hZEFNYWRseVhZTEx3dEllQU1xNE5NaFA5bnRlRWtiUGZOIn19" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"enc": "A128GCM", | ||
"alg": "ECDH-ES+A128KW", | ||
"epk": { | ||
"x": "fz5PKRx04mE_fA_cAacDcG77zySXyXbwE6ZIOLBV2QkrPSF00qUWDLABCc-1b1Yp", | ||
"crv": "P-384", | ||
"kty": "EC", | ||
"y": "_HmG3B4XhlSm8IX5jdtVLtWgDOX2eSISX-7qOORHU2FASynEFusyrdjSFnzPaBnu" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"message":"⌛ My lungs taste the air of Time Blown past falling sands"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"message":"⌛ My lungs taste the air of Time Blown past falling sands"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
eyJhbGciOiJFUzI1NiIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..biT6WtP64CFbToPdbXhnqLR1HHGlt4rdNeV7WTSUeWfl3IOrtl2qTOSIYETcytTaP8pVgq5gknJfBJ1_n29tsw |
7 changes: 7 additions & 0 deletions
7
tests/fixtures/message.signature.detached.compact.jws.verified.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"alg": "ES256", | ||
"b64": false, | ||
"crit": [ | ||
"b64" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"signature": "OdsdYvR89x3qDFiCNc8TZ8bobYOykyzCB5vsFl-6QGeS2Hjm2QmDjYLTTBCCrXhoR1u9L6xwcztaBHGDnPB0hg", | ||
"payload": "", | ||
"protected": "eyJhbGciOiJFUzI1NiIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"alg": "ES256", | ||
"b64": false, | ||
"crit": [ | ||
"b64" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"signature": "cecIZFdJnTO7ID7JVPSbUrV2G24UQ9yYlo_Pe51zQ0Viq_8Xf-XPHoGjHGS72FhiBiZGbUBmS_m4tF3aNc9tig", | ||
"payload": "eyJtZXNzYWdlIjoi4oybIE15IGx1bmdzIHRhc3RlIHRoZSBhaXIgb2YgVGltZSBCbG93biBwYXN0IGZhbGxpbmcgc2FuZHMifQo", | ||
"protected": "eyJhbGciOiJFUzI1NiJ9" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"alg": "ES256" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"message":"⌛ My lungs taste the air of Time Blown past falling sands"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"kid": "gssD4KFLIb7x0vuNwJcI6vaJG1VWkz7uNiLRbT2eY8M", | ||
"kty": "EC", | ||
"crv": "P-384", | ||
"alg": "ECDH-ES+A128KW", | ||
"x": "jTnh07iGoSZhhkQU4YrQYz1qBay-Ew5GIEfLtAcP8cqSM4mscbBUCL7dUR4AJJTR", | ||
"y": "BDs3vSj7EW72TywLlFA2KL7XhhU77Fjs54B5ALc4bJCsbq1g-imuhJtrKyUoqRrg", | ||
"d": "kNU19KCuXpEGXAJZ7uv3lpc18AK189J5Ys40QZo9mAVjyF6oCH89AgxQFSjAUPWG" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"kid": "6iSq2WlhW3dLmSl7_Z6uTuqyB07uvoAA87QvQSfcaYM", | ||
"kty": "EC", | ||
"crv": "P-256", | ||
"alg": "ES256", | ||
"x": "MAE7eYtog-0tk29yCgQsIXEHd4D11myEGUlVf6MmbNg", | ||
"y": "uMyAgLpw4IfQCFgUjRrbLfFORI_5SUT5suO8WBi5_lw", | ||
"d": "gOhNzI1D477voK9KSGY9_ACHBsVFpC-5IM7XCEhvNKc" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"kid": "gssD4KFLIb7x0vuNwJcI6vaJG1VWkz7uNiLRbT2eY8M", | ||
"kty": "EC", | ||
"crv": "P-384", | ||
"alg": "ECDH-ES+A128KW", | ||
"x": "jTnh07iGoSZhhkQU4YrQYz1qBay-Ew5GIEfLtAcP8cqSM4mscbBUCL7dUR4AJJTR", | ||
"y": "BDs3vSj7EW72TywLlFA2KL7XhhU77Fjs54B5ALc4bJCsbq1g-imuhJtrKyUoqRrg" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"kid": "6iSq2WlhW3dLmSl7_Z6uTuqyB07uvoAA87QvQSfcaYM", | ||
"kty": "EC", | ||
"crv": "P-256", | ||
"alg": "ES256", | ||
"x": "MAE7eYtog-0tk29yCgQsIXEHd4D11myEGUlVf6MmbNg", | ||
"y": "uMyAgLpw4IfQCFgUjRrbLfFORI_5SUT5suO8WBi5_lw" | ||
} |