internal: incomplete vault systems behind feature flag (#2340)

This commit is contained in:
Mo
2023-06-30 09:01:56 -05:00
committed by GitHub
parent d16e401bb9
commit b032eb9c9b
638 changed files with 20321 additions and 4813 deletions

View File

@@ -139,7 +139,6 @@ export interface PureCryptoInterface {
senderSecretKey: HexString,
recipientPublicKey: HexString,
): Base64String
sodiumCryptoBoxEasyDecrypt(
ciphertext: Base64String,
nonce: HexString,
@@ -147,7 +146,15 @@ export interface PureCryptoInterface {
recipientSecretKey: HexString,
): Utf8String
sodiumCryptoBoxGenerateKeypair(): PkcKeyPair
sodiumCryptoBoxSeedKeypair(seed: HexString): PkcKeyPair
sodiumCryptoSignSeedKeypair(seed: HexString): PkcKeyPair
sodiumCryptoSign(message: Utf8String, secretKey: HexString): Base64String
sodiumCryptoSignVerify(message: Utf8String, signature: Base64String, publicKey: HexString): boolean
sodiumCryptoKdfDeriveFromKey(key: HexString, subkeyNumber: number, subkeyLength: number, context: string): HexString
sodiumCryptoGenericHash(message: Utf8String, key?: HexString): HexString
/**
* Converts a plain string into base64

View File

@@ -1,7 +1,6 @@
import { HexString } from './HexString'
export type PkcKeyPair = {
keyType: 'curve25519' | 'ed25519' | 'x25519'
privateKey: HexString
publicKey: HexString
}

View File

@@ -8,4 +8,7 @@ export enum SodiumConstant {
CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_TAG_REKEY = 2,
CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_TAG_FINAL = 3,
CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_MESSAGEBYTES_MAX = 0x3fffffff80,
crypto_box_SEEDBYTES = 32,
crypto_sign_SEEDBYTES = 32,
crypto_generichash_KEYBYTES = 32,
}