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

Add Crypto Algorithm, KeyManager, and KMS to crypto package #152

Merged
merged 41 commits into from
Jul 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
3dfd8ee
KeyManager, CryptoAlgorithm, and KMS prototyping
frankhinek Jun 9, 2023
a8e0c30
Add Convert utility and secp256k1 and Ed25519 crypto algorithm implem…
frankhinek Jun 18, 2023
9b1cfbb
All tests passing
frankhinek Jun 18, 2023
e86432a
Added ECDH X25519 and improved tests
frankhinek Jun 19, 2023
7aaff7e
Refactor functions to options object style
frankhinek Jun 19, 2023
b437553
Increase test coverage
frankhinek Jun 20, 2023
d6b2094
Finish tests for default KMS key stores
frankhinek Jun 20, 2023
f69952e
Add ECDH and verify() to DefaultKMS and verify() to KeyManager
frankhinek Jun 20, 2023
4a31807
Implement deriveBits() in KeyManager and DefaultKms and improve test …
frankhinek Jun 21, 2023
a57527d
Before attempting to support multiple import options
frankhinek Jun 22, 2023
a58f89d
Implement importKey() in KeyManager and DefaultKms
frankhinek Jun 23, 2023
16a7ac0
Move AWS and GCP KMS prototyping out of crypto package
frankhinek Jun 23, 2023
3936b26
Internal structure refactor
frankhinek Jun 24, 2023
4089419
Rename ecc dir to ec and implement base AES alg with tests
frankhinek Jun 24, 2023
8486941
Initial AES-CTR implementation with generateKey() and tests
frankhinek Jun 25, 2023
befdbc6
Add hex string support to Convert util and fix ArrayBuffer tests
frankhinek Jun 25, 2023
2772466
Add Hex<->ArrayBuffer to Convert utility
frankhinek Jun 25, 2023
319c900
Implement AES-CTR encrypt() and decrypt()
frankhinek Jun 26, 2023
31f58f6
Implement encrypt() and add symmetric key import to LocalKms
frankhinek Jun 28, 2023
b3969c4
Implement decrypt() for LocalKms
frankhinek Jun 28, 2023
698aab6
Implement decrypt() and encrypt() in KeyManager
frankhinek Jun 28, 2023
6c4b926
Improve comments for crypto primitives
frankhinek Jun 30, 2023
135c755
Remove cloud KMS prototyping
frankhinek Jul 1, 2023
5292205
Added several new Convert methods
frankhinek Jul 3, 2023
aad62e1
Added Concat KDF crypto primitive
frankhinek Jul 3, 2023
5d63f37
Migrate utils to common and reduce crypto package dependencies
frankhinek Jul 3, 2023
94992af
Bump to common 0.1.1
frankhinek Jul 3, 2023
3dedede
Add XChaCha20 algorithm
frankhinek Jul 7, 2023
9b71851
Split out utils into separate test file
frankhinek Jul 7, 2023
1e0b2e0
Add missing VScode launch/tasks config for common and credentials pac…
frankhinek Jul 8, 2023
94225f1
Replace old data conversion functions with Convert utility
frankhinek Jul 8, 2023
f744955
Add Multicodec utility to common package
frankhinek Jul 8, 2023
8ef1305
Move MemoryStore to common package
frankhinek Jul 8, 2023
60618ed
Reorganizing prior to submitting PR
frankhinek Jul 9, 2023
49fa7b1
Move types into directory and ignore in code coverage
frankhinek Jul 9, 2023
4d05292
Minor formatting changes
frankhinek Jul 9, 2023
b2f3a49
Minor fix and formatting changes
frankhinek Jul 9, 2023
c514767
Rename crypto algorithms
frankhinek Jul 9, 2023
160eea9
Add AES-GCM crypto primitive
frankhinek Jul 9, 2023
a233276
Increase test coverage for common package
frankhinek Jul 9, 2023
b6db3c8
Minor formatting changes and removed type defs from coverage calculation
frankhinek Jul 9, 2023
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
25 changes: 23 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/common/.c8rc.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
],
"exclude": [
"__tests__/src/main.js",
"__tests__/src/types.js",
"__tests__/types/**"
],
"reporter": [
Expand Down
22 changes: 22 additions & 0 deletions packages/common/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "test:node",
"runtimeExecutable": "${workspaceFolder:root}/node_modules/.bin/mocha",
"runtimeArgs": [
"${workspaceFolder:common}/__tests__/**/*.spec.js"
],
"console": "internalConsole",
"preLaunchTask": "tsc: build - tsconfig.test.json",
"outFiles": [
"${workspaceFolder:common}/__tests__/**/*.js"
],
}
]
}
45 changes: 45 additions & 0 deletions packages/common/.vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "npm run build",
"type": "npm",
"script": "build",
"problemMatcher": [],
"group": {
"kind": "build",
"isDefault": true
}
},
{
"label": "tsc: build - tsconfig.json",
"type": "typescript",
"tsconfig": "tsconfig.json",
"problemMatcher": [
"$tsc"
],
"group": {
"kind": "build",
"isDefault": false
},
"options": {
"cwd": "${workspaceFolder:root}"
}
},
{
"label": "tsc: build - tsconfig.test.json",
"type": "typescript",
"tsconfig": "tsconfig.test.json",
"problemMatcher": [
"$tsc"
],
"group": {
"kind": "build",
"isDefault": false
},
"options": {
"cwd": "${workspaceFolder:root}"
}
},
]
}
4 changes: 3 additions & 1 deletion packages/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@
"engines": {
"node": ">=18.0.0"
},
"dependencies": {},
"dependencies": {
"multiformats": "11.0.2"
},
"devDependencies": {
"@types/chai": "4.3.0",
"@types/eslint": "8.37.0",
Expand Down
Loading