-
Notifications
You must be signed in to change notification settings - Fork 197
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(askar): create keys in the secure element (#1938)
Signed-off-by: Berend Sliedrecht <[email protected]>
- Loading branch information
1 parent
352383f
commit 9989ea7
Showing
14 changed files
with
106 additions
and
58 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { KeyBackend as CredoKeyBackend } from '@credo-ts/core' | ||
import { KeyBackend as AskarKeyBackend } from '@hyperledger/aries-askar-shared' | ||
|
||
export const convertToAskarKeyBackend = (credoKeyBackend: CredoKeyBackend) => { | ||
switch (credoKeyBackend) { | ||
case CredoKeyBackend.Software: | ||
return AskarKeyBackend.Software | ||
case CredoKeyBackend.SecureElement: | ||
return AskarKeyBackend.SecureElement | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
export enum KeyBackend { | ||
/** | ||
* | ||
* Generate a key using common software-based implementations. | ||
* Key material will be instantiated in memory. | ||
* | ||
* Supported for almost all, if not all, key types. | ||
* | ||
*/ | ||
Software = 'Software', | ||
|
||
/** | ||
* | ||
* Generate a key within the secure element of the device. | ||
* | ||
* For now, this is only supported using Aries Askar in iOS or Android for `KeyType.P256`. | ||
* | ||
*/ | ||
SecureElement = 'SecureElement', | ||
} |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.