-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
22 changed files
with
316 additions
and
91 deletions.
There are no files selected for viewing
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,23 @@ | ||
# Generation of keys | ||
|
||
```bash | ||
# Generate Private Keys | ||
openssl ecparam -genkey -name prime256v1 -noout -out artifacts/client.priv.pem | ||
openssl ecparam -genkey -name prime256v1 -noout -out artifacts/server.priv.pem | ||
|
||
# Generate Public Keys | ||
openssl ec -in ./artifacts/client.priv.pem -pubout -out ./artifacts/client.pub.pem | ||
openssl ec -in ./artifacts/server.priv.pem -pubout -out ./artifacts/server.pub.pem | ||
|
||
# Generate JWKs for public & private keys | ||
npx eckles ./artifacts/client.priv.pem > ./artifacts/client.priv.jwk | ||
npx eckles ./artifacts/client.pub.pem > ./artifacts/client.pub.jwk | ||
npx eckles ./artifacts/server.priv.pem > ./artifacts/server.priv.jwk | ||
npx eckles ./artifacts/server.pub.pem > ./artifacts/server.pub.jwk | ||
|
||
# Generate JWK sets | ||
cat ./artifacts/client.priv.jwk| jq '{"keys": [. * {"use": "sig", "kid": "client", "alg": "ES256"}]}' > ./artifacts/client.priv.jwkset | ||
cat ./artifacts/client.pub.jwk| jq '{"keys": [. * {"use": "sig", "kid": "client", "alg": "ES256"}]}' > ./artifacts/client.pub.jwkset | ||
cat ./artifacts/server.priv.jwk| jq '{"keys": [. * {"use": "sig", "kid": "server", "alg": "ES256"}]}' > ./artifacts/server.priv.jwkset | ||
cat ./artifacts/server.pub.jwk| jq '{"keys": [. * {"use": "sig", "kid": "server", "alg": "ES256"}]}' > ./artifacts/server.pub.jwkset | ||
``` |
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 @@ | ||
{ | ||
"kty": "EC", | ||
"crv": "P-256", | ||
"d": "I5XC9VN5oJUQpXO5LqN5jNm9NTPAo_8zUkiUhJlgoRk", | ||
"x": "QaXzjB1aMQRoXcgFTQUneS6EBVaQHQObzaHJjKV6_fM", | ||
"y": "fljC46dVTTQFsyB4Iap7pmTzolhLX2KOtajOI2kEh7g" | ||
} |
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 @@ | ||
{ | ||
"keys": [ | ||
{ | ||
"kty": "EC", | ||
"crv": "P-256", | ||
"d": "I5XC9VN5oJUQpXO5LqN5jNm9NTPAo_8zUkiUhJlgoRk", | ||
"x": "QaXzjB1aMQRoXcgFTQUneS6EBVaQHQObzaHJjKV6_fM", | ||
"y": "fljC46dVTTQFsyB4Iap7pmTzolhLX2KOtajOI2kEh7g", | ||
"use": "sig", | ||
"kid": "client", | ||
"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,5 @@ | ||
-----BEGIN EC PRIVATE KEY----- | ||
MHcCAQEEICOVwvVTeaCVEKVzuS6jeYzZvTUzwKP/M1JIlISZYKEZoAoGCCqGSM49 | ||
AwEHoUQDQgAEQaXzjB1aMQRoXcgFTQUneS6EBVaQHQObzaHJjKV6/fN+WMLjp1VN | ||
NAWzIHghqnumZPOiWEtfYo61qM4jaQSHuA== | ||
-----END EC PRIVATE KEY----- |
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,6 @@ | ||
{ | ||
"kty": "EC", | ||
"crv": "P-256", | ||
"x": "QaXzjB1aMQRoXcgFTQUneS6EBVaQHQObzaHJjKV6_fM", | ||
"y": "fljC46dVTTQFsyB4Iap7pmTzolhLX2KOtajOI2kEh7g" | ||
} |
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,13 @@ | ||
{ | ||
"keys": [ | ||
{ | ||
"kty": "EC", | ||
"crv": "P-256", | ||
"x": "QaXzjB1aMQRoXcgFTQUneS6EBVaQHQObzaHJjKV6_fM", | ||
"y": "fljC46dVTTQFsyB4Iap7pmTzolhLX2KOtajOI2kEh7g", | ||
"use": "sig", | ||
"kid": "client", | ||
"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,4 @@ | ||
-----BEGIN PUBLIC KEY----- | ||
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEQaXzjB1aMQRoXcgFTQUneS6EBVaQ | ||
HQObzaHJjKV6/fN+WMLjp1VNNAWzIHghqnumZPOiWEtfYo61qM4jaQSHuA== | ||
-----END PUBLIC KEY----- |
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 @@ | ||
{ | ||
"kty": "EC", | ||
"crv": "P-256", | ||
"d": "6-YakWKMTt1LEZDlEuuUpKjrMuhpYEaFeors8RKdxr8", | ||
"x": "-e56Pjr4gW6fk73WGO1hyldhEG7X4pnkD_U6Tclqe58", | ||
"y": "RgLVVgsLbPeGZEZs2_9buxp6f8RqsJza37JQJZOySCM" | ||
} |
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 @@ | ||
{ | ||
"keys": [ | ||
{ | ||
"kty": "EC", | ||
"crv": "P-256", | ||
"d": "6-YakWKMTt1LEZDlEuuUpKjrMuhpYEaFeors8RKdxr8", | ||
"x": "-e56Pjr4gW6fk73WGO1hyldhEG7X4pnkD_U6Tclqe58", | ||
"y": "RgLVVgsLbPeGZEZs2_9buxp6f8RqsJza37JQJZOySCM", | ||
"use": "sig", | ||
"kid": "server", | ||
"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,5 @@ | ||
-----BEGIN EC PRIVATE KEY----- | ||
MHcCAQEEIOvmGpFijE7dSxGQ5RLrlKSo6zLoaWBGhXqK7PESnca/oAoGCCqGSM49 | ||
AwEHoUQDQgAE+e56Pjr4gW6fk73WGO1hyldhEG7X4pnkD/U6Tclqe59GAtVWCwts | ||
94ZkRmzb/1u7Gnp/xGqwnNrfslAlk7JIIw== | ||
-----END EC PRIVATE KEY----- |
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,6 @@ | ||
{ | ||
"kty": "EC", | ||
"crv": "P-256", | ||
"x": "-e56Pjr4gW6fk73WGO1hyldhEG7X4pnkD_U6Tclqe58", | ||
"y": "RgLVVgsLbPeGZEZs2_9buxp6f8RqsJza37JQJZOySCM" | ||
} |
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,13 @@ | ||
{ | ||
"keys": [ | ||
{ | ||
"kty": "EC", | ||
"crv": "P-256", | ||
"x": "-e56Pjr4gW6fk73WGO1hyldhEG7X4pnkD_U6Tclqe58", | ||
"y": "RgLVVgsLbPeGZEZs2_9buxp6f8RqsJza37JQJZOySCM", | ||
"use": "sig", | ||
"kid": "server", | ||
"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,4 @@ | ||
-----BEGIN PUBLIC KEY----- | ||
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE+e56Pjr4gW6fk73WGO1hyldhEG7X | ||
4pnkD/U6Tclqe59GAtVWCwts94ZkRmzb/1u7Gnp/xGqwnNrfslAlk7JIIw== | ||
-----END PUBLIC KEY----- |
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
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
Oops, something went wrong.