-
Notifications
You must be signed in to change notification settings - Fork 204
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
feat: add dynamic suite and signing provider #949
feat: add dynamic suite and signing provider #949
Conversation
Signed-off-by: Timo Glastra <timo@animo.id>
Signed-off-by: Timo Glastra <timo@animo.id>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice abstraction. Just left small comments.
export interface SigningProvider { | ||
readonly keyType: KeyType | ||
|
||
createKey(options: CreateKeyOptions): Promise<KeyPair> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
createKey(options: CreateKeyOptions): Promise<KeyPair> | |
createKeyPair(options: CreateKeyPairOptions): Promise<KeyPair> |
For createKey
I would expect a symmetric key.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense 👍
|
||
const LinkedDataSignature = suites.LinkedDataSignature | ||
|
||
export const SignatureSuiteToken = Symbol('SignatureSuiteToken') | ||
export interface SuiteInfo { | ||
suiteClass: typeof LinkedDataSignature |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would assume this is correct, but if is supposed to be generic between, for now, ed25519 and BBS+ then the LinkedDataSignature
is not really a good name I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the bbs suites also extend linked data signature.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope it extends LinkedDataProof
, and LinkedDataSignature
also extends LinkedDataProof
.
@karimStekelenburg any reason you used LinkedDataSignature
instead of LinkedDataProof
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm not sure tbh. Probably by accident
Signed-off-by: Timo Glastra <timo@animo.id>
Codecov Report
@@ Coverage Diff @@
## 0.3.0-pre #949 +/- ##
=============================================
- Coverage 87.09% 85.20% -1.90%
=============================================
Files 536 539 +3
Lines 13050 13086 +36
Branches 2244 2244
=============================================
- Hits 11366 11150 -216
- Misses 1588 1805 +217
- Partials 96 131 +35
Continue to review full report at Codecov.
|
Signed-off-by: Timo Glastra <timo@animo.id>
Merging as only failing test is the BBS test. |
Signed-off-by: Timo Glastra <timo@animo.id>
Signed-off-by: Timo Glastra <timo@animo.id>
Signed-off-by: Timo Glastra <timo@animo.id>
Signed-off-by: Timo Glastra <timo@animo.id> Signed-off-by: Ariel Gentile <gentilester@gmail.com>
Extends the
SignatureSuiteRegistry
and adds aSigningProviderRegistry
that allows to dynamically register signers for key types and signature suites. This is needed in preparation of #948, so we can extract the bbs signing provider and signature suites to it's own package.Extracting into a separate package will be done in a separate PR.
BbsService has been moved into the generic
SigningProvider
interface. I've removed support for Bls12381g1 keys for now as they're not really used for anything. It will be easy to add back in.