@reallyme/crypto 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -4,137 +4,89 @@ SPDX-FileCopyrightText: Copyright © 2026 ReallyMe LLC. All rights reserved
|
|
|
4
4
|
SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
-->
|
|
6
6
|
|
|
7
|
-
#
|
|
7
|
+
# @reallyme/crypto
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
formats, provider policy, and fail-closed verification behavior used by the
|
|
12
|
-
Rust, Swift, and Kotlin packages.
|
|
9
|
+
[](https://www.npmjs.com/package/@reallyme/crypto)
|
|
10
|
+
[](https://github.com/reallyme/crypto/blob/main/LICENSE)
|
|
13
11
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
should stay shared with Rust are provided by the generated WASM module.
|
|
12
|
+
ReallyMe Crypto provides a platform-agnostic cryptography API for TypeScript,
|
|
13
|
+
Rust, Swift, and Kotlin.
|
|
17
14
|
|
|
18
|
-
|
|
15
|
+
Applications can implement cryptographic operations once and rely on identical
|
|
16
|
+
algorithms, key formats, verification behavior, and protocol contracts across
|
|
17
|
+
servers, browsers, iOS, Android, and WASM. Native platform providers are used
|
|
18
|
+
where appropriate, while shared conformance vectors ensure byte-for-byte
|
|
19
|
+
compatible behavior across every supported language.
|
|
20
|
+
|
|
21
|
+
## Why
|
|
22
|
+
|
|
23
|
+
Modern cryptography APIs differ across platforms. Algorithms are exposed
|
|
24
|
+
differently, key formats vary, providers have different capabilities, and error
|
|
25
|
+
behavior is inconsistent.
|
|
26
|
+
|
|
27
|
+
ReallyMe Crypto provides one consistent cryptography contract across every
|
|
28
|
+
supported platform. The same application logic can be shared between backend
|
|
29
|
+
services, mobile applications, and browsers without maintaining separate
|
|
30
|
+
cryptographic implementations.
|
|
31
|
+
|
|
32
|
+
## Installation
|
|
19
33
|
|
|
20
34
|
```sh
|
|
21
35
|
npm install @reallyme/crypto
|
|
22
36
|
```
|
|
23
37
|
|
|
24
|
-
##
|
|
38
|
+
## Example
|
|
25
39
|
|
|
26
40
|
```ts
|
|
27
41
|
import { ReallyMeCrypto } from "@reallyme/crypto";
|
|
28
42
|
|
|
29
43
|
const digest = ReallyMeCrypto.hash(
|
|
30
44
|
"SHA2-256",
|
|
31
|
-
new TextEncoder().encode("
|
|
32
|
-
);
|
|
33
|
-
|
|
34
|
-
const tag = ReallyMeCrypto.authenticate(
|
|
35
|
-
"HMAC-SHA-256",
|
|
36
|
-
key,
|
|
37
|
-
new TextEncoder().encode("message"),
|
|
45
|
+
new TextEncoder().encode("hello"),
|
|
38
46
|
);
|
|
39
47
|
```
|
|
40
48
|
|
|
41
|
-
Signature verification throws `ReallyMeCryptoError` on
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
## Provider Model
|
|
45
|
-
|
|
46
|
-
Provider selection is explicit:
|
|
47
|
-
|
|
48
|
-
- `@noble/curves` and `@noble/hashes`, pinned to the versions exercised by the
|
|
49
|
-
TypeScript conformance lane, for JavaScript-native classical primitives.
|
|
50
|
-
- The ReallyMe Rust WASM lane for primitives that should stay shared with Rust,
|
|
51
|
-
including ML-KEM, ML-DSA, SLH-DSA, X-Wing, Argon2id, AES-GCM-SIV, XChaCha,
|
|
52
|
-
AES-KW, HPKE, RSA verify, and codecs.
|
|
53
|
-
|
|
54
|
-
The public API has two layers:
|
|
55
|
-
|
|
56
|
-
- algorithm-specific objects, such as `ReallyMeEd25519`, `ReallyMeX25519`,
|
|
57
|
-
`ReallyMeP256Ecdh`, `ReallyMeSecp256k1`, and `ReallyMeCodecs`;
|
|
58
|
-
- `ReallyMeCrypto`, a typed facade keyed by repository-wide algorithm string
|
|
59
|
-
unions.
|
|
60
|
-
|
|
61
|
-
Reserved identifiers, future contract entries, and unsupported overload shapes
|
|
62
|
-
throw `ReallyMeCryptoError` with code `unsupported-algorithm`. The npm package
|
|
63
|
-
does not silently fall back to a different provider. The complete TypeScript
|
|
64
|
-
lane is tracked in [PROVIDER_POLICY.md](../../PROVIDER_POLICY.md).
|
|
65
|
-
|
|
66
|
-
## Protobuf
|
|
67
|
-
|
|
68
|
-
The package exports generated protobuf identifiers and boundary adapters from
|
|
69
|
-
`@reallyme/crypto/proto`.
|
|
70
|
-
|
|
71
|
-
```ts
|
|
72
|
-
import {
|
|
73
|
-
HashAlgorithm,
|
|
74
|
-
hashAlgorithmFromProto,
|
|
75
|
-
hashAlgorithmToProto,
|
|
76
|
-
} from "@reallyme/crypto/proto";
|
|
77
|
-
|
|
78
|
-
const facadeAlgorithm = hashAlgorithmFromProto(HashAlgorithm.SHA2_256);
|
|
79
|
-
const protoAlgorithm = hashAlgorithmToProto(facadeAlgorithm);
|
|
80
|
-
```
|
|
49
|
+
The API is synchronous. Signature verification throws `ReallyMeCryptoError` on
|
|
50
|
+
invalid input rather than returning a boolean that can be accidentally ignored.
|
|
81
51
|
|
|
82
|
-
|
|
83
|
-
`ReallyMeCryptoError` with code `unsupported-algorithm`.
|
|
52
|
+
## Post-Quantum and WASM
|
|
84
53
|
|
|
85
|
-
|
|
54
|
+
Classical primitives are backed by pinned `@noble` packages. The primitives that
|
|
55
|
+
must stay identical to Rust — ML-KEM, ML-DSA, SLH-DSA, X-Wing, Argon2id, HPKE,
|
|
56
|
+
and others — are backed by a WASM module that ships prebuilt with the package.
|
|
86
57
|
|
|
87
|
-
WASM
|
|
88
|
-
|
|
89
|
-
with `provider-failure`.
|
|
58
|
+
Install the WASM provider once at startup before using those algorithms;
|
|
59
|
+
otherwise they fail closed with `provider-failure`.
|
|
90
60
|
|
|
91
61
|
```ts
|
|
92
62
|
import { readFileSync } from "node:fs";
|
|
93
|
-
import { installReallyMeWasmProvider } from "@reallyme/crypto";
|
|
63
|
+
import { installReallyMeWasmProvider, ReallyMeCrypto } from "@reallyme/crypto";
|
|
94
64
|
import * as wasmProvider from "@reallyme/crypto/wasm/reallyme_crypto_wasm.js";
|
|
95
65
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
66
|
+
const wasmUrl = import.meta.resolve(
|
|
67
|
+
"@reallyme/crypto/wasm/reallyme_crypto_wasm_bg.wasm",
|
|
68
|
+
);
|
|
69
|
+
wasmProvider.initSync({ module: readFileSync(new URL(wasmUrl)) });
|
|
99
70
|
installReallyMeWasmProvider(wasmProvider);
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
After installation, the facade routes WASM-backed algorithms through that
|
|
103
|
-
provider:
|
|
104
|
-
|
|
105
|
-
```ts
|
|
106
|
-
import { ReallyMeCrypto } from "@reallyme/crypto";
|
|
107
71
|
|
|
108
72
|
const keyPair = ReallyMeCrypto.generateKemKeyPair("X-Wing-768");
|
|
109
|
-
const encapsulation = ReallyMeCrypto.encapsulate("X-Wing-768", keyPair.publicKey);
|
|
110
|
-
const sharedSecret = ReallyMeCrypto.decapsulate(
|
|
111
|
-
"X-Wing-768",
|
|
112
|
-
encapsulation.ciphertext,
|
|
113
|
-
keyPair.secretKey,
|
|
114
|
-
);
|
|
115
73
|
```
|
|
116
74
|
|
|
117
|
-
|
|
118
|
-
`wasm-bindgen-cli` `0.2.126` or newer.
|
|
119
|
-
|
|
120
|
-
```sh
|
|
121
|
-
cargo install wasm-pack --version 0.15.0 --locked
|
|
122
|
-
cargo install wasm-bindgen-cli --version 0.2.126 --locked
|
|
123
|
-
npm --prefix packages/ts test
|
|
124
|
-
```
|
|
75
|
+
## Features
|
|
125
76
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
77
|
+
- Platform-agnostic cryptography APIs.
|
|
78
|
+
- Consistent key formats and protocol identifiers.
|
|
79
|
+
- Shared conformance vectors across Rust, Swift, Kotlin, and TypeScript.
|
|
80
|
+
- Native providers where available, WASM-backed implementations where needed.
|
|
81
|
+
- Typed errors and fail-closed verification behavior.
|
|
82
|
+
- Protobuf algorithm identifiers for API and storage boundaries, via
|
|
83
|
+
`@reallyme/crypto/proto`.
|
|
84
|
+
- JWK, multikey, multicodec, HPKE, ML-KEM, ML-DSA, Ed25519, secp256k1, X25519,
|
|
85
|
+
AES-GCM, ChaCha20-Poly1305, and more.
|
|
133
86
|
|
|
134
|
-
##
|
|
87
|
+
## Documentation
|
|
135
88
|
|
|
136
|
-
The
|
|
137
|
-
|
|
89
|
+
The complete documentation, provider matrix, protocol contracts, and conformance
|
|
90
|
+
specifications are available in the main repository:
|
|
138
91
|
|
|
139
|
-
|
|
140
|
-
`crates/conformance/vectors` remain test harnesses.
|
|
92
|
+
https://github.com/reallyme/crypto
|
|
@@ -5,7 +5,7 @@ import { enumDesc, fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv2";
|
|
|
5
5
|
/**
|
|
6
6
|
* Describes the file reallyme/crypto/v1/crypto.proto.
|
|
7
7
|
*/
|
|
8
|
-
export const file_reallyme_crypto_v1_crypto = /*@__PURE__*/ fileDesc("
|
|
8
|
+
export const file_reallyme_crypto_v1_crypto = /*@__PURE__*/ fileDesc("Ch9yZWFsbHltZS9jcnlwdG8vdjEvY3J5cHRvLnByb3RvEhJyZWFsbHltZS5jcnlwdG8udjEi0QQKGUNyeXB0b0FsZ29yaXRobUlkZW50aWZpZXISOwoJc2lnbmF0dXJlGAEgASgOMiYucmVhbGx5bWUuY3J5cHRvLnYxLlNpZ25hdHVyZUFsZ29yaXRobUgAEkIKDWtleV9hZ3JlZW1lbnQYAiABKA4yKS5yZWFsbHltZS5jcnlwdG8udjEuS2V5QWdyZWVtZW50QWxnb3JpdGhtSAASLwoDa2VtGAMgASgOMiAucmVhbGx5bWUuY3J5cHRvLnYxLktlbUFsZ29yaXRobUgAEi0KBGhwa2UYBCABKA4yHS5yZWFsbHltZS5jcnlwdG8udjEuSHBrZVN1aXRlSAASMQoEYWVhZBgFIAEoDjIhLnJlYWxseW1lLmNyeXB0by52MS5BZWFkQWxnb3JpdGhtSAASMQoEaGFzaBgGIAEoDjIhLnJ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EhNX1JTQV9QUklWEBYSLAooTVVMVElDT0RFQ19LRVlfQUxHT1JJVEhNX01MX0tFTV81MTJfUFJJVhAXEiwKKE1VTFRJQ09ERUNfS0VZX0FMR09SSVRITV9NTF9LRU1fNzY4X1BSSVYQGBItCilNVUxUSUNPREVDX0tFWV9BTEdPUklUSE1fTUxfS0VNXzEwMjRfUFJJVhAZQicKE21lLnJlYWxseS5jcnlwdG8udjFQAboCDVJlYWxseU1lUHJvdG9iBnByb3RvMw");
|
|
9
9
|
/**
|
|
10
10
|
* Describes the message reallyme.crypto.v1.CryptoAlgorithmIdentifier.
|
|
11
11
|
* Use `create(CryptoAlgorithmIdentifierSchema)` to create a new message.
|
|
@@ -986,37 +986,9 @@ export function xchacha20Poly1305Seal(key, nonce, aad, plaintext) {
|
|
|
986
986
|
function __wbg_get_imports() {
|
|
987
987
|
const import0 = {
|
|
988
988
|
__proto__: null,
|
|
989
|
-
__wbg___wbindgen_is_function_1ff95bcc5517c252: function(arg0) {
|
|
990
|
-
const ret = typeof(arg0) === 'function';
|
|
991
|
-
return ret;
|
|
992
|
-
},
|
|
993
|
-
__wbg___wbindgen_is_object_a27215656b807791: function(arg0) {
|
|
994
|
-
const val = arg0;
|
|
995
|
-
const ret = typeof(val) === 'object' && val !== null;
|
|
996
|
-
return ret;
|
|
997
|
-
},
|
|
998
|
-
__wbg___wbindgen_is_string_ea5e6cc2e4141dfe: function(arg0) {
|
|
999
|
-
const ret = typeof(arg0) === 'string';
|
|
1000
|
-
return ret;
|
|
1001
|
-
},
|
|
1002
|
-
__wbg___wbindgen_is_undefined_c05833b95a3cf397: function(arg0) {
|
|
1003
|
-
const ret = arg0 === undefined;
|
|
1004
|
-
return ret;
|
|
1005
|
-
},
|
|
1006
989
|
__wbg___wbindgen_throw_344f42d3211c4765: function(arg0, arg1) {
|
|
1007
990
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
1008
991
|
},
|
|
1009
|
-
__wbg_call_a6e5c5dce5018821: function() { return handleError(function (arg0, arg1, arg2) {
|
|
1010
|
-
const ret = arg0.call(arg1, arg2);
|
|
1011
|
-
return ret;
|
|
1012
|
-
}, arguments); },
|
|
1013
|
-
__wbg_crypto_38df2bab126b63dc: function(arg0) {
|
|
1014
|
-
const ret = arg0.crypto;
|
|
1015
|
-
return ret;
|
|
1016
|
-
},
|
|
1017
|
-
__wbg_getRandomValues_c44a50d8cfdaebeb: function() { return handleError(function (arg0, arg1) {
|
|
1018
|
-
arg0.getRandomValues(arg1);
|
|
1019
|
-
}, arguments); },
|
|
1020
992
|
__wbg_getRandomValues_cc7f052a444bb2ce: function() { return handleError(function (arg0, arg1) {
|
|
1021
993
|
globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
|
|
1022
994
|
}, arguments); },
|
|
@@ -1024,10 +996,6 @@ function __wbg_get_imports() {
|
|
|
1024
996
|
const ret = arg0.length;
|
|
1025
997
|
return ret;
|
|
1026
998
|
},
|
|
1027
|
-
__wbg_msCrypto_bd5a034af96bcba6: function(arg0) {
|
|
1028
|
-
const ret = arg0.msCrypto;
|
|
1029
|
-
return ret;
|
|
1030
|
-
},
|
|
1031
999
|
__wbg_new_da52cf8fe3429cb2: function() {
|
|
1032
1000
|
const ret = new Object();
|
|
1033
1001
|
return ret;
|
|
@@ -1036,67 +1004,19 @@ function __wbg_get_imports() {
|
|
|
1036
1004
|
const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
|
|
1037
1005
|
return ret;
|
|
1038
1006
|
},
|
|
1039
|
-
__wbg_new_with_length_e6785c33c8e4cce8: function(arg0) {
|
|
1040
|
-
const ret = new Uint8Array(arg0 >>> 0);
|
|
1041
|
-
return ret;
|
|
1042
|
-
},
|
|
1043
|
-
__wbg_node_84ea875411254db1: function(arg0) {
|
|
1044
|
-
const ret = arg0.node;
|
|
1045
|
-
return ret;
|
|
1046
|
-
},
|
|
1047
|
-
__wbg_process_44c7a14e11e9f69e: function(arg0) {
|
|
1048
|
-
const ret = arg0.process;
|
|
1049
|
-
return ret;
|
|
1050
|
-
},
|
|
1051
1007
|
__wbg_prototypesetcall_4770620bbe4688a0: function(arg0, arg1, arg2) {
|
|
1052
1008
|
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
1053
1009
|
},
|
|
1054
|
-
__wbg_randomFillSync_6c25eac9869eb53c: function() { return handleError(function (arg0, arg1) {
|
|
1055
|
-
arg0.randomFillSync(arg1);
|
|
1056
|
-
}, arguments); },
|
|
1057
|
-
__wbg_require_b4edbdcf3e2a1ef0: function() { return handleError(function () {
|
|
1058
|
-
const ret = module.require;
|
|
1059
|
-
return ret;
|
|
1060
|
-
}, arguments); },
|
|
1061
1010
|
__wbg_set_8535240470bf2500: function() { return handleError(function (arg0, arg1, arg2) {
|
|
1062
1011
|
const ret = Reflect.set(arg0, arg1, arg2);
|
|
1063
1012
|
return ret;
|
|
1064
1013
|
}, arguments); },
|
|
1065
|
-
__wbg_static_accessor_GLOBAL_4ef717fb391d88b7: function() {
|
|
1066
|
-
const ret = typeof global === 'undefined' ? null : global;
|
|
1067
|
-
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1068
|
-
},
|
|
1069
|
-
__wbg_static_accessor_GLOBAL_THIS_8d1badc68b5a74f4: function() {
|
|
1070
|
-
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
1071
|
-
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1072
|
-
},
|
|
1073
|
-
__wbg_static_accessor_SELF_146583524fe1469b: function() {
|
|
1074
|
-
const ret = typeof self === 'undefined' ? null : self;
|
|
1075
|
-
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1076
|
-
},
|
|
1077
|
-
__wbg_static_accessor_WINDOW_f2829a2234d7819e: function() {
|
|
1078
|
-
const ret = typeof window === 'undefined' ? null : window;
|
|
1079
|
-
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1080
|
-
},
|
|
1081
|
-
__wbg_subarray_3ed232c8a6baee09: function(arg0, arg1, arg2) {
|
|
1082
|
-
const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
|
|
1083
|
-
return ret;
|
|
1084
|
-
},
|
|
1085
|
-
__wbg_versions_276b2795b1c6a219: function(arg0) {
|
|
1086
|
-
const ret = arg0.versions;
|
|
1087
|
-
return ret;
|
|
1088
|
-
},
|
|
1089
1014
|
__wbindgen_cast_0000000000000001: function(arg0) {
|
|
1090
1015
|
// Cast intrinsic for `F64 -> Externref`.
|
|
1091
1016
|
const ret = arg0;
|
|
1092
1017
|
return ret;
|
|
1093
1018
|
},
|
|
1094
1019
|
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
1095
|
-
// Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
|
|
1096
|
-
const ret = getArrayU8FromWasm0(arg0, arg1);
|
|
1097
|
-
return ret;
|
|
1098
|
-
},
|
|
1099
|
-
__wbindgen_cast_0000000000000003: function(arg0, arg1) {
|
|
1100
1020
|
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
1101
1021
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
1102
1022
|
return ret;
|
|
@@ -1149,10 +1069,6 @@ function handleError(f, args) {
|
|
|
1149
1069
|
}
|
|
1150
1070
|
}
|
|
1151
1071
|
|
|
1152
|
-
function isLikeNone(x) {
|
|
1153
|
-
return x === undefined || x === null;
|
|
1154
|
-
}
|
|
1155
|
-
|
|
1156
1072
|
function passStringToWasm0(arg, malloc, realloc) {
|
|
1157
1073
|
if (realloc === undefined) {
|
|
1158
1074
|
const buf = cachedTextEncoder.encode(arg);
|
|
Binary file
|