
Security News
High Salaries No Longer Enough to Attract Top Cybersecurity Talent
A survey of 500 cybersecurity pros reveals high pay isn't enough—lack of growth and flexibility is driving attrition and risking organizational security.
@quarkid/kms-client
Advanced tools
KMS comes from the English key management system and is the component in charge of creating key pairs, encrypting, decrypting and signing content. The current Quark ID KMS implementation supports the ES256k, DIDComm, and BBSBLS2020 algorithms.
KMS comes from the English key management system and is the component in charge of creating key pairs, encrypting, decrypting and signing content. The current Quark ID KMS implementation supports the ES256k, DIDComm, and BBSBLS2020 algorithms.
constructor(
config: {
lang: LANG;
storage: KMSStorage;
didResolver ?: (did: string) => Promise<DIDDocument>;
mobile ?: boolean
}
)
KMS applies dependency inversion concepts so it requires send a KMSStorage by its constructor.
interface KMSStorage {
add(key: string, data: any): Promise<void>;
get(key: string): Promise<any>;
getAll(): Promise<Map<string, any>>;
update(key: string, data: any);
remove(key: string);
}
This is a mock implementation example
import { KMSStorage } from "@quarkid/kms-core";
export class SecureStorage implements KMSStorage {
map = new Map<string, any>();
async add(key: string, data: any): Promise<void> {
this.map.set(key, data);
}
async get(key: string): Promise<any> {
return this.map.get(key);
}
async getAll(): Promise<Map<string, any>> {
return this.map;
}
async update(key: string, data: any) {
this.map.set(key, data);
}
async remove(key: string) {
this.map.delete(key);
}
}
const updateKey = await kms.create(Suite.ES256k);
const recoveryKey = await kms.create(Suite.ES256k);
const didComm = await kms.create(Suite.DIDComm);
const bbsbls = await kms.create(Suite.Bbsbls2020);
sign(
suite: Suite,
publicKeyJWK: IJWK,
content: any
): Promise<string>
return await kms.sign(Suite.ES256k, updateKey, content)
It is used to sign a verifiable credential.
signVC(
suite: Suite,
publicKeyJWK: IJWK,
vc: any,
did: string,
verificationMethodId: string,
purpose: Purpose
): Promise<VerifiableCredential>
pack(
publicKeyJWK: IJWK,
toHexPublicKeys: string[],
contentToSign: string
): Promise<string>
unpack(
publicKeyJWK: IJWK,
packedContent: string
): Promise<string>
export(
publicKeyJWK: IJWK
): Promise<any>
getPublicKeysBySuiteType(
suite: Suite
): Promise<IJWK[]>
getAllPublicKeys(): Promise<IJWK[]>
FAQs
KMS comes from the English key management system and is the component in charge of creating key pairs, encrypting, decrypting and signing content. The current Quark ID KMS implementation supports the ES256k, DIDComm, and BBSBLS2020 algorithms.
The npm package @quarkid/kms-client receives a total of 4 weekly downloads. As such, @quarkid/kms-client popularity was classified as not popular.
We found that @quarkid/kms-client demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A survey of 500 cybersecurity pros reveals high pay isn't enough—lack of growth and flexibility is driving attrition and risking organizational security.
Product
Socket, the leader in open source security, is now available on Google Cloud Marketplace for simplified procurement and enhanced protection against supply chain attacks.
Security News
Corepack will be phased out from future Node.js releases following a TSC vote.