@awacloud/fw 0.1.0
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/CHANGELOG.md +79 -0
- package/LICENSE +176 -0
- package/NOTICE +12 -0
- package/README.md +355 -0
- package/dist/build/fw.core.pure.meta.json +29 -0
- package/dist/build/fw.core.pure.min.js +26 -0
- package/dist/build/fw.full.pure.meta.json +224 -0
- package/dist/build/fw.full.pure.min.js +60 -0
- package/dist/build/fw.minimal.pure.meta.json +21 -0
- package/dist/build/fw.minimal.pure.min.js +26 -0
- package/dist/build/fw.pack.compress-heavy.pure.meta.json +29 -0
- package/dist/build/fw.pack.compress-heavy.pure.min.js +8 -0
- package/dist/build/fw.pack.crypto-advanced.pure.meta.json +38 -0
- package/dist/build/fw.pack.crypto-advanced.pure.min.js +6 -0
- package/dist/build/fw.pack.crypto-basic.pure.meta.json +29 -0
- package/dist/build/fw.pack.crypto-basic.pure.min.js +6 -0
- package/dist/build/fw.pack.crypto-identity.pure.meta.json +29 -0
- package/dist/build/fw.pack.crypto-identity.pure.min.js +9 -0
- package/dist/build/fw.pack.realtime.pure.meta.json +21 -0
- package/dist/build/fw.pack.realtime.pure.min.js +6 -0
- package/dist/build/fw.pack.sensors.pure.meta.json +21 -0
- package/dist/build/fw.pack.sensors.pure.min.js +6 -0
- package/dist/build/fw.pack.structures-advanced.pure.meta.json +20 -0
- package/dist/build/fw.pack.structures-advanced.pure.min.js +6 -0
- package/dist/build/fw.pack.text-advanced.pure.meta.json +20 -0
- package/dist/build/fw.pack.text-advanced.pure.min.js +6 -0
- package/dist/build/fw.pwa.pure.meta.json +127 -0
- package/dist/build/fw.pwa.pure.min.js +55 -0
- package/dist/build/fw.site-interactive.pure.meta.json +81 -0
- package/dist/build/fw.site-interactive.pure.min.js +52 -0
- package/dist/build/fw.site.pure.meta.json +51 -0
- package/dist/build/fw.site.pure.min.js +35 -0
- package/dist/build/fw.spa.pure.meta.json +108 -0
- package/dist/build/fw.spa.pure.min.js +55 -0
- package/dist/build/io/compress/brotli_dict.bin +432 -0
- package/dist/build/sanity-base-classic.min.js +6 -0
- package/dist/build/sanity-community-classic.min.js +6 -0
- package/dist/build/sanity.min.js +6 -0
- package/dist/types/core/logger.d.ts +71 -0
- package/dist/types/core/logger.d.ts.map +1 -0
- package/dist/types/core/modules.d.ts +3962 -0
- package/dist/types/core/modules.d.ts.map +1 -0
- package/dist/types/core/readyState.d.ts +14 -0
- package/dist/types/core/readyState.d.ts.map +1 -0
- package/dist/types/core/runtime.d.ts +625 -0
- package/dist/types/core/runtime.d.ts.map +1 -0
- package/dist/types/core/worker-helper.d.ts +153 -0
- package/dist/types/core/worker-helper.d.ts.map +1 -0
- package/dist/types/crypto/cipher/aes.d.ts +55 -0
- package/dist/types/crypto/cipher/aes.d.ts.map +1 -0
- package/dist/types/crypto/cipher/chacha20.d.ts +33 -0
- package/dist/types/crypto/cipher/chacha20.d.ts.map +1 -0
- package/dist/types/crypto/hash/adf.d.ts +65 -0
- package/dist/types/crypto/hash/adf.d.ts.map +1 -0
- package/dist/types/crypto/hash/argon2.d.ts +79 -0
- package/dist/types/crypto/hash/argon2.d.ts.map +1 -0
- package/dist/types/crypto/hash/blake2b.d.ts +40 -0
- package/dist/types/crypto/hash/blake2b.d.ts.map +1 -0
- package/dist/types/crypto/hash/hkdf.d.ts +88 -0
- package/dist/types/crypto/hash/hkdf.d.ts.map +1 -0
- package/dist/types/crypto/hash/hmac.d.ts +85 -0
- package/dist/types/crypto/hash/hmac.d.ts.map +1 -0
- package/dist/types/crypto/hash/pbkdf2.d.ts +80 -0
- package/dist/types/crypto/hash/pbkdf2.d.ts.map +1 -0
- package/dist/types/crypto/hash/poly1305.d.ts +31 -0
- package/dist/types/crypto/hash/poly1305.d.ts.map +1 -0
- package/dist/types/crypto/hash/sha224.d.ts +80 -0
- package/dist/types/crypto/hash/sha224.d.ts.map +1 -0
- package/dist/types/crypto/hash/sha256.d.ts +82 -0
- package/dist/types/crypto/hash/sha256.d.ts.map +1 -0
- package/dist/types/crypto/hash/sha3.d.ts +111 -0
- package/dist/types/crypto/hash/sha3.d.ts.map +1 -0
- package/dist/types/crypto/hash/sha384.d.ts +84 -0
- package/dist/types/crypto/hash/sha384.d.ts.map +1 -0
- package/dist/types/crypto/hash/sha512.d.ts +87 -0
- package/dist/types/crypto/hash/sha512.d.ts.map +1 -0
- package/dist/types/crypto/hash/sha512_224.d.ts +84 -0
- package/dist/types/crypto/hash/sha512_224.d.ts.map +1 -0
- package/dist/types/crypto/hash/sha512_256.d.ts +84 -0
- package/dist/types/crypto/hash/sha512_256.d.ts.map +1 -0
- package/dist/types/crypto/mode/cbc.d.ts +38 -0
- package/dist/types/crypto/mode/cbc.d.ts.map +1 -0
- package/dist/types/crypto/mode/chacha20poly1305.d.ts +71 -0
- package/dist/types/crypto/mode/chacha20poly1305.d.ts.map +1 -0
- package/dist/types/crypto/mode/cmac.d.ts +56 -0
- package/dist/types/crypto/mode/cmac.d.ts.map +1 -0
- package/dist/types/crypto/mode/ctr.d.ts +52 -0
- package/dist/types/crypto/mode/ctr.d.ts.map +1 -0
- package/dist/types/crypto/mode/gcm.d.ts +88 -0
- package/dist/types/crypto/mode/gcm.d.ts.map +1 -0
- package/dist/types/crypto/mode/kw.d.ts +60 -0
- package/dist/types/crypto/mode/kw.d.ts.map +1 -0
- package/dist/types/crypto/pkc/ecc.d.ts +284 -0
- package/dist/types/crypto/pkc/ecc.d.ts.map +1 -0
- package/dist/types/crypto/pkc/ed25519.d.ts +107 -0
- package/dist/types/crypto/pkc/ed25519.d.ts.map +1 -0
- package/dist/types/crypto/pkc/hybridKem.d.ts +154 -0
- package/dist/types/crypto/pkc/hybridKem.d.ts.map +1 -0
- package/dist/types/crypto/pkc/hybridSign.d.ts +383 -0
- package/dist/types/crypto/pkc/hybridSign.d.ts.map +1 -0
- package/dist/types/crypto/pkc/ml_dsa.d.ts +174 -0
- package/dist/types/crypto/pkc/ml_dsa.d.ts.map +1 -0
- package/dist/types/crypto/pkc/ml_kem.d.ts +194 -0
- package/dist/types/crypto/pkc/ml_kem.d.ts.map +1 -0
- package/dist/types/crypto/pkc/rsa.d.ts +175 -0
- package/dist/types/crypto/pkc/rsa.d.ts.map +1 -0
- package/dist/types/crypto/pkc/slh_dsa.d.ts +232 -0
- package/dist/types/crypto/pkc/slh_dsa.d.ts.map +1 -0
- package/dist/types/crypto/pkc/x25519.d.ts +37 -0
- package/dist/types/crypto/pkc/x25519.d.ts.map +1 -0
- package/dist/types/crypto/utils/aes_ctr.d.ts +84 -0
- package/dist/types/crypto/utils/aes_ctr.d.ts.map +1 -0
- package/dist/types/crypto/utils/aes_modes.d.ts +128 -0
- package/dist/types/crypto/utils/aes_modes.d.ts.map +1 -0
- package/dist/types/crypto/utils/asn1-oid.d.ts +45 -0
- package/dist/types/crypto/utils/asn1-oid.d.ts.map +1 -0
- package/dist/types/crypto/utils/asn1.d.ts +115 -0
- package/dist/types/crypto/utils/asn1.d.ts.map +1 -0
- package/dist/types/crypto/utils/bitArray.d.ts +75 -0
- package/dist/types/crypto/utils/bitArray.d.ts.map +1 -0
- package/dist/types/crypto/utils/bn.d.ts +214 -0
- package/dist/types/crypto/utils/bn.d.ts.map +1 -0
- package/dist/types/crypto/utils/jws.d.ts +159 -0
- package/dist/types/crypto/utils/jws.d.ts.map +1 -0
- package/dist/types/crypto/utils/keyformat.d.ts +100 -0
- package/dist/types/crypto/utils/keyformat.d.ts.map +1 -0
- package/dist/types/crypto/utils/pad.d.ts +44 -0
- package/dist/types/crypto/utils/pad.d.ts.map +1 -0
- package/dist/types/crypto/utils/pem.d.ts +41 -0
- package/dist/types/crypto/utils/pem.d.ts.map +1 -0
- package/dist/types/crypto/utils/random.d.ts +203 -0
- package/dist/types/crypto/utils/random.d.ts.map +1 -0
- package/dist/types/crypto/utils/rsaKeygen.d.ts +162 -0
- package/dist/types/crypto/utils/rsaKeygen.d.ts.map +1 -0
- package/dist/types/crypto/utils/totp.d.ts +183 -0
- package/dist/types/crypto/utils/totp.d.ts.map +1 -0
- package/dist/types/crypto/utils/uuid.d.ts +29 -0
- package/dist/types/crypto/utils/uuid.d.ts.map +1 -0
- package/dist/types/crypto/wasm/aes.d.ts +59 -0
- package/dist/types/crypto/wasm/aes.d.ts.map +1 -0
- package/dist/types/crypto/wasm/argon2.d.ts +70 -0
- package/dist/types/crypto/wasm/argon2.d.ts.map +1 -0
- package/dist/types/crypto/wasm/blake2b.d.ts +59 -0
- package/dist/types/crypto/wasm/blake2b.d.ts.map +1 -0
- package/dist/types/crypto/wasm/chacha20poly1305.d.ts +43 -0
- package/dist/types/crypto/wasm/chacha20poly1305.d.ts.map +1 -0
- package/dist/types/crypto/wasm/cmac.d.ts +42 -0
- package/dist/types/crypto/wasm/cmac.d.ts.map +1 -0
- package/dist/types/crypto/wasm/ecc.d.ts +56 -0
- package/dist/types/crypto/wasm/ecc.d.ts.map +1 -0
- package/dist/types/crypto/wasm/ed25519.d.ts +52 -0
- package/dist/types/crypto/wasm/ed25519.d.ts.map +1 -0
- package/dist/types/crypto/wasm/hkdf.d.ts +40 -0
- package/dist/types/crypto/wasm/hkdf.d.ts.map +1 -0
- package/dist/types/crypto/wasm/hmac.d.ts +42 -0
- package/dist/types/crypto/wasm/hmac.d.ts.map +1 -0
- package/dist/types/crypto/wasm/ml_dsa.d.ts +48 -0
- package/dist/types/crypto/wasm/ml_dsa.d.ts.map +1 -0
- package/dist/types/crypto/wasm/ml_kem.d.ts +58 -0
- package/dist/types/crypto/wasm/ml_kem.d.ts.map +1 -0
- package/dist/types/crypto/wasm/pbkdf2.d.ts +38 -0
- package/dist/types/crypto/wasm/pbkdf2.d.ts.map +1 -0
- package/dist/types/crypto/wasm/rsa.d.ts +56 -0
- package/dist/types/crypto/wasm/rsa.d.ts.map +1 -0
- package/dist/types/crypto/wasm/runtime.d.ts +99 -0
- package/dist/types/crypto/wasm/runtime.d.ts.map +1 -0
- package/dist/types/crypto/wasm/sha2.d.ts +45 -0
- package/dist/types/crypto/wasm/sha2.d.ts.map +1 -0
- package/dist/types/crypto/wasm/sha3.d.ts +57 -0
- package/dist/types/crypto/wasm/sha3.d.ts.map +1 -0
- package/dist/types/crypto/wasm/slh_dsa.d.ts +62 -0
- package/dist/types/crypto/wasm/slh_dsa.d.ts.map +1 -0
- package/dist/types/crypto/wasm/x25519.d.ts +53 -0
- package/dist/types/crypto/wasm/x25519.d.ts.map +1 -0
- package/dist/types/crypto/webcrypto/aes.d.ts +59 -0
- package/dist/types/crypto/webcrypto/aes.d.ts.map +1 -0
- package/dist/types/crypto/webcrypto/aeskw.d.ts +40 -0
- package/dist/types/crypto/webcrypto/aeskw.d.ts.map +1 -0
- package/dist/types/crypto/webcrypto/digest.d.ts +43 -0
- package/dist/types/crypto/webcrypto/digest.d.ts.map +1 -0
- package/dist/types/crypto/webcrypto/ecc.d.ts +51 -0
- package/dist/types/crypto/webcrypto/ecc.d.ts.map +1 -0
- package/dist/types/crypto/webcrypto/ed25519.d.ts +43 -0
- package/dist/types/crypto/webcrypto/ed25519.d.ts.map +1 -0
- package/dist/types/crypto/webcrypto/hkdf.d.ts +18 -0
- package/dist/types/crypto/webcrypto/hkdf.d.ts.map +1 -0
- package/dist/types/crypto/webcrypto/hmac.d.ts +43 -0
- package/dist/types/crypto/webcrypto/hmac.d.ts.map +1 -0
- package/dist/types/crypto/webcrypto/pbkdf2.d.ts +18 -0
- package/dist/types/crypto/webcrypto/pbkdf2.d.ts.map +1 -0
- package/dist/types/crypto/webcrypto/rsa.d.ts +51 -0
- package/dist/types/crypto/webcrypto/rsa.d.ts.map +1 -0
- package/dist/types/crypto/webcrypto/x25519.d.ts +43 -0
- package/dist/types/crypto/webcrypto/x25519.d.ts.map +1 -0
- package/dist/types/dom/display/animate.d.ts +35 -0
- package/dist/types/dom/display/animate.d.ts.map +1 -0
- package/dist/types/dom/display/fullscreen.d.ts +59 -0
- package/dist/types/dom/display/fullscreen.d.ts.map +1 -0
- package/dist/types/dom/fs/download.d.ts +36 -0
- package/dist/types/dom/fs/download.d.ts.map +1 -0
- package/dist/types/dom/fs/fsAccess.d.ts +107 -0
- package/dist/types/dom/fs/fsAccess.d.ts.map +1 -0
- package/dist/types/dom/fs/indexedDB.d.ts +62 -0
- package/dist/types/dom/fs/indexedDB.d.ts.map +1 -0
- package/dist/types/dom/fs/remoteStore.d.ts +64 -0
- package/dist/types/dom/fs/remoteStore.d.ts.map +1 -0
- package/dist/types/dom/fs/storage.d.ts +56 -0
- package/dist/types/dom/fs/storage.d.ts.map +1 -0
- package/dist/types/dom/lifecycle/idle.d.ts +91 -0
- package/dist/types/dom/lifecycle/idle.d.ts.map +1 -0
- package/dist/types/dom/lifecycle/visibility.d.ts +49 -0
- package/dist/types/dom/lifecycle/visibility.d.ts.map +1 -0
- package/dist/types/dom/lifecycle/wakeLock.d.ts +69 -0
- package/dist/types/dom/lifecycle/wakeLock.d.ts.map +1 -0
- package/dist/types/dom/net/ajax.d.ts +27 -0
- package/dist/types/dom/net/ajax.d.ts.map +1 -0
- package/dist/types/dom/net/broadcastChannel.d.ts +51 -0
- package/dist/types/dom/net/broadcastChannel.d.ts.map +1 -0
- package/dist/types/dom/net/network.d.ts +80 -0
- package/dist/types/dom/net/network.d.ts.map +1 -0
- package/dist/types/dom/net/sse.d.ts +72 -0
- package/dist/types/dom/net/sse.d.ts.map +1 -0
- package/dist/types/dom/net/webrtc.d.ts +149 -0
- package/dist/types/dom/net/webrtc.d.ts.map +1 -0
- package/dist/types/dom/net/ws.d.ts +70 -0
- package/dist/types/dom/net/ws.d.ts.map +1 -0
- package/dist/types/dom/query/dnd.d.ts +86 -0
- package/dist/types/dom/query/dnd.d.ts.map +1 -0
- package/dist/types/dom/query/dom.d.ts +194 -0
- package/dist/types/dom/query/dom.d.ts.map +1 -0
- package/dist/types/dom/query/events.d.ts +135 -0
- package/dist/types/dom/query/events.d.ts.map +1 -0
- package/dist/types/dom/query/gesture.d.ts +59 -0
- package/dist/types/dom/query/gesture.d.ts.map +1 -0
- package/dist/types/dom/query/media.d.ts +156 -0
- package/dist/types/dom/query/media.d.ts.map +1 -0
- package/dist/types/dom/rendering/chart.d.ts +143 -0
- package/dist/types/dom/rendering/chart.d.ts.map +1 -0
- package/dist/types/dom/rendering/component.d.ts +92 -0
- package/dist/types/dom/rendering/component.d.ts.map +1 -0
- package/dist/types/dom/rendering/devtools-ui.d.ts +83 -0
- package/dist/types/dom/rendering/devtools-ui.d.ts.map +1 -0
- package/dist/types/dom/rendering/devtools.d.ts +68 -0
- package/dist/types/dom/rendering/devtools.d.ts.map +1 -0
- package/dist/types/dom/rendering/parser.d.ts +216 -0
- package/dist/types/dom/rendering/parser.d.ts.map +1 -0
- package/dist/types/dom/rendering/reactiveBind.d.ts +101 -0
- package/dist/types/dom/rendering/reactiveBind.d.ts.map +1 -0
- package/dist/types/dom/rendering/render.d.ts +121 -0
- package/dist/types/dom/rendering/render.d.ts.map +1 -0
- package/dist/types/dom/rendering/sanitize.d.ts +48 -0
- package/dist/types/dom/rendering/sanitize.d.ts.map +1 -0
- package/dist/types/dom/rendering/secPolicy.d.ts +89 -0
- package/dist/types/dom/rendering/secPolicy.d.ts.map +1 -0
- package/dist/types/dom/rendering/template.d.ts +251 -0
- package/dist/types/dom/rendering/template.d.ts.map +1 -0
- package/dist/types/dom/rendering/themeTokens.d.ts +61 -0
- package/dist/types/dom/rendering/themeTokens.d.ts.map +1 -0
- package/dist/types/dom/rendering/uiSession-core.d.ts +192 -0
- package/dist/types/dom/rendering/uiSession-core.d.ts.map +1 -0
- package/dist/types/dom/rendering/uiSession-direct.d.ts +63 -0
- package/dist/types/dom/rendering/uiSession-direct.d.ts.map +1 -0
- package/dist/types/dom/rendering/uiSession-list.d.ts +205 -0
- package/dist/types/dom/rendering/uiSession-list.d.ts.map +1 -0
- package/dist/types/dom/rendering/uiSession.d.ts +285 -0
- package/dist/types/dom/rendering/uiSession.d.ts.map +1 -0
- package/dist/types/dom/rendering/virtualScroll.d.ts +80 -0
- package/dist/types/dom/rendering/virtualScroll.d.ts.map +1 -0
- package/dist/types/dom/sensors/battery.d.ts +71 -0
- package/dist/types/dom/sensors/battery.d.ts.map +1 -0
- package/dist/types/dom/sensors/geolocation.d.ts +83 -0
- package/dist/types/dom/sensors/geolocation.d.ts.map +1 -0
- package/dist/types/dom/sensors/networkInfo.d.ts +82 -0
- package/dist/types/dom/sensors/networkInfo.d.ts.map +1 -0
- package/dist/types/dom/sensors/sensors.d.ts +191 -0
- package/dist/types/dom/sensors/sensors.d.ts.map +1 -0
- package/dist/types/dom/sw/backgroundSync.d.ts +48 -0
- package/dist/types/dom/sw/backgroundSync.d.ts.map +1 -0
- package/dist/types/dom/sw/cache.d.ts +71 -0
- package/dist/types/dom/sw/cache.d.ts.map +1 -0
- package/dist/types/dom/sw/push.d.ts +77 -0
- package/dist/types/dom/sw/push.d.ts.map +1 -0
- package/dist/types/dom/sw/serviceWorker.d.ts +57 -0
- package/dist/types/dom/sw/serviceWorker.d.ts.map +1 -0
- package/dist/types/dom/sw/sharedWorker.d.ts +81 -0
- package/dist/types/dom/sw/sharedWorker.d.ts.map +1 -0
- package/dist/types/dom/utils/a11y.d.ts +53 -0
- package/dist/types/dom/utils/a11y.d.ts.map +1 -0
- package/dist/types/dom/utils/clipboard.d.ts +44 -0
- package/dist/types/dom/utils/clipboard.d.ts.map +1 -0
- package/dist/types/dom/utils/entropyCollector.d.ts +58 -0
- package/dist/types/dom/utils/entropyCollector.d.ts.map +1 -0
- package/dist/types/dom/utils/focus.d.ts +123 -0
- package/dist/types/dom/utils/focus.d.ts.map +1 -0
- package/dist/types/dom/utils/form.d.ts +227 -0
- package/dist/types/dom/utils/form.d.ts.map +1 -0
- package/dist/types/dom/utils/formKit.d.ts +206 -0
- package/dist/types/dom/utils/formKit.d.ts.map +1 -0
- package/dist/types/dom/utils/keybindings.d.ts +53 -0
- package/dist/types/dom/utils/keybindings.d.ts.map +1 -0
- package/dist/types/dom/utils/leaderElection.d.ts +70 -0
- package/dist/types/dom/utils/leaderElection.d.ts.map +1 -0
- package/dist/types/dom/utils/notifications.d.ts +164 -0
- package/dist/types/dom/utils/notifications.d.ts.map +1 -0
- package/dist/types/dom/utils/permissions.d.ts +35 -0
- package/dist/types/dom/utils/permissions.d.ts.map +1 -0
- package/dist/types/dom/utils/route.d.ts +117 -0
- package/dist/types/dom/utils/route.d.ts.map +1 -0
- package/dist/types/dom/utils/ua.d.ts +35 -0
- package/dist/types/dom/utils/ua.d.ts.map +1 -0
- package/dist/types/dom/utils/webauthn.d.ts +98 -0
- package/dist/types/dom/utils/webauthn.d.ts.map +1 -0
- package/dist/types/io/binary/reader.d.ts +59 -0
- package/dist/types/io/binary/reader.d.ts.map +1 -0
- package/dist/types/io/binary/writer.d.ts +56 -0
- package/dist/types/io/binary/writer.d.ts.map +1 -0
- package/dist/types/io/calc/adler32.d.ts +31 -0
- package/dist/types/io/calc/adler32.d.ts.map +1 -0
- package/dist/types/io/calc/bigint.d.ts +74 -0
- package/dist/types/io/calc/bigint.d.ts.map +1 -0
- package/dist/types/io/calc/crc32.d.ts +36 -0
- package/dist/types/io/calc/crc32.d.ts.map +1 -0
- package/dist/types/io/calc/easing.d.ts +60 -0
- package/dist/types/io/calc/easing.d.ts.map +1 -0
- package/dist/types/io/codec/b64.d.ts +28 -0
- package/dist/types/io/codec/b64.d.ts.map +1 -0
- package/dist/types/io/codec/base32.d.ts +28 -0
- package/dist/types/io/codec/base32.d.ts.map +1 -0
- package/dist/types/io/codec/base58.d.ts +28 -0
- package/dist/types/io/codec/base58.d.ts.map +1 -0
- package/dist/types/io/codec/buffer.d.ts +66 -0
- package/dist/types/io/codec/buffer.d.ts.map +1 -0
- package/dist/types/io/codec/cbor.d.ts +43 -0
- package/dist/types/io/codec/cbor.d.ts.map +1 -0
- package/dist/types/io/codec/csv.d.ts +35 -0
- package/dist/types/io/codec/csv.d.ts.map +1 -0
- package/dist/types/io/codec/hex.d.ts +28 -0
- package/dist/types/io/codec/hex.d.ts.map +1 -0
- package/dist/types/io/codec/mime.d.ts +100 -0
- package/dist/types/io/codec/mime.d.ts.map +1 -0
- package/dist/types/io/codec/msgpack.d.ts +36 -0
- package/dist/types/io/codec/msgpack.d.ts.map +1 -0
- package/dist/types/io/codec/url.d.ts +52 -0
- package/dist/types/io/codec/url.d.ts.map +1 -0
- package/dist/types/io/codec/utf8.d.ts +22 -0
- package/dist/types/io/codec/utf8.d.ts.map +1 -0
- package/dist/types/io/codec/xml.d.ts +91 -0
- package/dist/types/io/codec/xml.d.ts.map +1 -0
- package/dist/types/io/compress/bitstream.d.ts +51 -0
- package/dist/types/io/compress/bitstream.d.ts.map +1 -0
- package/dist/types/io/compress/brotli.d.ts +86 -0
- package/dist/types/io/compress/brotli.d.ts.map +1 -0
- package/dist/types/io/compress/brotli_dict.d.ts +76 -0
- package/dist/types/io/compress/brotli_dict.d.ts.map +1 -0
- package/dist/types/io/compress/brotli_dict_words.d.ts +43 -0
- package/dist/types/io/compress/brotli_dict_words.d.ts.map +1 -0
- package/dist/types/io/compress/brotli_frame.d.ts +166 -0
- package/dist/types/io/compress/brotli_frame.d.ts.map +1 -0
- package/dist/types/io/compress/brotli_shared.d.ts +165 -0
- package/dist/types/io/compress/brotli_shared.d.ts.map +1 -0
- package/dist/types/io/compress/deflate.d.ts +89 -0
- package/dist/types/io/compress/deflate.d.ts.map +1 -0
- package/dist/types/io/compress/gzip.d.ts +100 -0
- package/dist/types/io/compress/gzip.d.ts.map +1 -0
- package/dist/types/io/compress/huffman.d.ts +37 -0
- package/dist/types/io/compress/huffman.d.ts.map +1 -0
- package/dist/types/io/compress/lz4.d.ts +45 -0
- package/dist/types/io/compress/lz4.d.ts.map +1 -0
- package/dist/types/io/compress/lz77.d.ts +66 -0
- package/dist/types/io/compress/lz77.d.ts.map +1 -0
- package/dist/types/io/compress/lzw.d.ts +37 -0
- package/dist/types/io/compress/lzw.d.ts.map +1 -0
- package/dist/types/io/compress/zip.d.ts +112 -0
- package/dist/types/io/compress/zip.d.ts.map +1 -0
- package/dist/types/io/compress/zlib.d.ts +97 -0
- package/dist/types/io/compress/zlib.d.ts.map +1 -0
- package/dist/types/io/i18n/i18n.d.ts +64 -0
- package/dist/types/io/i18n/i18n.d.ts.map +1 -0
- package/dist/types/io/math/fixed-point.d.ts +30 -0
- package/dist/types/io/math/fixed-point.d.ts.map +1 -0
- package/dist/types/io/math/geom.d.ts +125 -0
- package/dist/types/io/math/geom.d.ts.map +1 -0
- package/dist/types/io/math/interp.d.ts +48 -0
- package/dist/types/io/math/interp.d.ts.map +1 -0
- package/dist/types/io/math/linalg.d.ts +117 -0
- package/dist/types/io/math/linalg.d.ts.map +1 -0
- package/dist/types/io/math/stats.d.ts +45 -0
- package/dist/types/io/math/stats.d.ts.map +1 -0
- package/dist/types/io/structures/btree.d.ts +84 -0
- package/dist/types/io/structures/btree.d.ts.map +1 -0
- package/dist/types/io/structures/heap.d.ts +75 -0
- package/dist/types/io/structures/heap.d.ts.map +1 -0
- package/dist/types/io/structures/lruCache.d.ts +88 -0
- package/dist/types/io/structures/lruCache.d.ts.map +1 -0
- package/dist/types/io/structures/ringBuffer.d.ts +82 -0
- package/dist/types/io/structures/ringBuffer.d.ts.map +1 -0
- package/dist/types/io/structures/tree-walker.d.ts +95 -0
- package/dist/types/io/structures/tree-walker.d.ts.map +1 -0
- package/dist/types/io/structures/trie.d.ts +71 -0
- package/dist/types/io/structures/trie.d.ts.map +1 -0
- package/dist/types/io/sync/abort.d.ts +59 -0
- package/dist/types/io/sync/abort.d.ts.map +1 -0
- package/dist/types/io/sync/atomics.d.ts +107 -0
- package/dist/types/io/sync/atomics.d.ts.map +1 -0
- package/dist/types/io/sync/cancellable.d.ts +69 -0
- package/dist/types/io/sync/cancellable.d.ts.map +1 -0
- package/dist/types/io/sync/channel.d.ts +70 -0
- package/dist/types/io/sync/channel.d.ts.map +1 -0
- package/dist/types/io/sync/mutex.d.ts +39 -0
- package/dist/types/io/sync/mutex.d.ts.map +1 -0
- package/dist/types/io/sync/semaphore.d.ts +40 -0
- package/dist/types/io/sync/semaphore.d.ts.map +1 -0
- package/dist/types/io/sync/tokenBucket.d.ts +53 -0
- package/dist/types/io/sync/tokenBucket.d.ts.map +1 -0
- package/dist/types/io/text/ansi.d.ts +125 -0
- package/dist/types/io/text/ansi.d.ts.map +1 -0
- package/dist/types/io/text/html-entities.d.ts +35 -0
- package/dist/types/io/text/html-entities.d.ts.map +1 -0
- package/dist/types/io/text/semver.d.ts +75 -0
- package/dist/types/io/text/semver.d.ts.map +1 -0
- package/dist/types/io/text/str.d.ts +88 -0
- package/dist/types/io/text/str.d.ts.map +1 -0
- package/dist/types/io/text/unicode.d.ts +70 -0
- package/dist/types/io/text/unicode.d.ts.map +1 -0
- package/dist/types/io/time/date.d.ts +73 -0
- package/dist/types/io/time/date.d.ts.map +1 -0
- package/dist/types/io/timing/clock.d.ts +39 -0
- package/dist/types/io/timing/clock.d.ts.map +1 -0
- package/dist/types/io/timing/rateLimit.d.ts +40 -0
- package/dist/types/io/timing/rateLimit.d.ts.map +1 -0
- package/dist/types/io/timing/scheduler.d.ts +122 -0
- package/dist/types/io/timing/scheduler.d.ts.map +1 -0
- package/dist/types/io/utils/bitmap.d.ts +34 -0
- package/dist/types/io/utils/bitmap.d.ts.map +1 -0
- package/dist/types/io/utils/errors.d.ts +94 -0
- package/dist/types/io/utils/errors.d.ts.map +1 -0
- package/dist/types/io/utils/eventBus.d.ts +68 -0
- package/dist/types/io/utils/eventBus.d.ts.map +1 -0
- package/dist/types/io/utils/queue.d.ts +69 -0
- package/dist/types/io/utils/queue.d.ts.map +1 -0
- package/dist/types/io/utils/signal.d.ts +362 -0
- package/dist/types/io/utils/signal.d.ts.map +1 -0
- package/dist/types/io/utils/ui8.d.ts +34 -0
- package/dist/types/io/utils/ui8.d.ts.map +1 -0
- package/dist/types/io/utils/valid.d.ts +130 -0
- package/dist/types/io/utils/valid.d.ts.map +1 -0
- package/dist/types/main.d.ts +25 -0
- package/dist/types/main.d.ts.map +1 -0
- package/dist/types/process/message.d.ts +64 -0
- package/dist/types/process/message.d.ts.map +1 -0
- package/dist/types/process/rpc.d.ts +35 -0
- package/dist/types/process/rpc.d.ts.map +1 -0
- package/dist/types/process/workerPool.d.ts +62 -0
- package/dist/types/process/workerPool.d.ts.map +1 -0
- package/dist/types/sanity/base.d.ts +28 -0
- package/dist/types/sanity/base.d.ts.map +1 -0
- package/dist/types/sanity/community.d.ts +20 -0
- package/dist/types/sanity/community.d.ts.map +1 -0
- package/dist/types/sanity/lockdown-apply.d.ts +7 -0
- package/dist/types/sanity/lockdown-apply.d.ts.map +1 -0
- package/dist/types/sanity/lockdown.d.ts +43 -0
- package/dist/types/sanity/lockdown.d.ts.map +1 -0
- package/dist/types/sanity/wasm-gate.d.ts +128 -0
- package/dist/types/sanity/wasm-gate.d.ts.map +1 -0
- package/docs/README.md +301 -0
- package/docs/api/README.md +33 -0
- package/docs/api/core/README.md +14 -0
- package/docs/api/core/logger.md +151 -0
- package/docs/api/core/main.md +105 -0
- package/docs/api/core/modules.md +123 -0
- package/docs/api/core/readyState.md +94 -0
- package/docs/api/core/runtime.md +499 -0
- package/docs/api/core/worker-helper.md +180 -0
- package/docs/api/crypto/README.md +39 -0
- package/docs/api/crypto/cipher/README.md +24 -0
- package/docs/api/crypto/cipher/aes.md +101 -0
- package/docs/api/crypto/cipher/chacha20.md +85 -0
- package/docs/api/crypto/hash/README.md +49 -0
- package/docs/api/crypto/hash/adf.md +61 -0
- package/docs/api/crypto/hash/argon2.md +92 -0
- package/docs/api/crypto/hash/blake2b.md +88 -0
- package/docs/api/crypto/hash/hkdf.md +82 -0
- package/docs/api/crypto/hash/hmac.md +90 -0
- package/docs/api/crypto/hash/pbkdf2.md +93 -0
- package/docs/api/crypto/hash/poly1305.md +71 -0
- package/docs/api/crypto/hash/sha224.md +61 -0
- package/docs/api/crypto/hash/sha256.md +84 -0
- package/docs/api/crypto/hash/sha3.md +89 -0
- package/docs/api/crypto/hash/sha384.md +58 -0
- package/docs/api/crypto/hash/sha512.md +73 -0
- package/docs/api/crypto/hash/sha512_224.md +59 -0
- package/docs/api/crypto/hash/sha512_256.md +58 -0
- package/docs/api/crypto/mode/README.md +33 -0
- package/docs/api/crypto/mode/cbc.md +69 -0
- package/docs/api/crypto/mode/chacha20poly1305.md +77 -0
- package/docs/api/crypto/mode/cmac.md +79 -0
- package/docs/api/crypto/mode/ctr.md +66 -0
- package/docs/api/crypto/mode/gcm.md +93 -0
- package/docs/api/crypto/mode/kw.md +84 -0
- package/docs/api/crypto/pkc/README.md +48 -0
- package/docs/api/crypto/pkc/ecc.md +91 -0
- package/docs/api/crypto/pkc/ed25519.md +99 -0
- package/docs/api/crypto/pkc/hybridKem.md +178 -0
- package/docs/api/crypto/pkc/hybridSign.md +192 -0
- package/docs/api/crypto/pkc/ml_dsa.md +99 -0
- package/docs/api/crypto/pkc/ml_kem.md +90 -0
- package/docs/api/crypto/pkc/rsa.md +87 -0
- package/docs/api/crypto/pkc/slh_dsa.md +86 -0
- package/docs/api/crypto/pkc/x25519.md +84 -0
- package/docs/api/crypto/utils/README.md +39 -0
- package/docs/api/crypto/utils/aes_ctr.md +71 -0
- package/docs/api/crypto/utils/aes_modes.md +81 -0
- package/docs/api/crypto/utils/asn1-oid.md +130 -0
- package/docs/api/crypto/utils/asn1.md +69 -0
- package/docs/api/crypto/utils/bitArray.md +77 -0
- package/docs/api/crypto/utils/bn.md +67 -0
- package/docs/api/crypto/utils/jws.md +94 -0
- package/docs/api/crypto/utils/keyformat.md +78 -0
- package/docs/api/crypto/utils/pad.md +66 -0
- package/docs/api/crypto/utils/pem.md +63 -0
- package/docs/api/crypto/utils/random.md +103 -0
- package/docs/api/crypto/utils/rsaKeygen.md +118 -0
- package/docs/api/crypto/utils/totp.md +159 -0
- package/docs/api/crypto/utils/uuid.md +98 -0
- package/docs/api/crypto/wasm/README.md +76 -0
- package/docs/api/crypto/wasm/aes.md +128 -0
- package/docs/api/crypto/wasm/argon2.md +110 -0
- package/docs/api/crypto/wasm/blake2b.md +103 -0
- package/docs/api/crypto/wasm/chacha20poly1305.md +120 -0
- package/docs/api/crypto/wasm/cmac.md +119 -0
- package/docs/api/crypto/wasm/ecc.md +114 -0
- package/docs/api/crypto/wasm/ed25519.md +117 -0
- package/docs/api/crypto/wasm/hkdf.md +163 -0
- package/docs/api/crypto/wasm/hmac.md +129 -0
- package/docs/api/crypto/wasm/ml_dsa.md +99 -0
- package/docs/api/crypto/wasm/ml_kem.md +91 -0
- package/docs/api/crypto/wasm/pbkdf2.md +111 -0
- package/docs/api/crypto/wasm/rsa.md +113 -0
- package/docs/api/crypto/wasm/runtime.md +172 -0
- package/docs/api/crypto/wasm/sha2.md +95 -0
- package/docs/api/crypto/wasm/sha3.md +127 -0
- package/docs/api/crypto/wasm/slh_dsa.md +89 -0
- package/docs/api/crypto/wasm/x25519.md +116 -0
- package/docs/api/crypto/webcrypto/README.md +56 -0
- package/docs/api/crypto/webcrypto/aes.md +140 -0
- package/docs/api/crypto/webcrypto/aeskw.md +120 -0
- package/docs/api/crypto/webcrypto/digest.md +103 -0
- package/docs/api/crypto/webcrypto/ecc.md +122 -0
- package/docs/api/crypto/webcrypto/ed25519.md +121 -0
- package/docs/api/crypto/webcrypto/hkdf.md +141 -0
- package/docs/api/crypto/webcrypto/hmac.md +112 -0
- package/docs/api/crypto/webcrypto/pbkdf2.md +140 -0
- package/docs/api/crypto/webcrypto/rsa.md +149 -0
- package/docs/api/crypto/webcrypto/x25519.md +96 -0
- package/docs/api/dom/README.md +117 -0
- package/docs/api/dom/display/README.md +27 -0
- package/docs/api/dom/display/animate.md +113 -0
- package/docs/api/dom/display/fullscreen.md +121 -0
- package/docs/api/dom/fs/README.md +36 -0
- package/docs/api/dom/fs/download.md +108 -0
- package/docs/api/dom/fs/fsAccess.md +200 -0
- package/docs/api/dom/fs/indexedDB.md +219 -0
- package/docs/api/dom/fs/remoteStore.md +158 -0
- package/docs/api/dom/fs/storage.md +197 -0
- package/docs/api/dom/lifecycle/README.md +11 -0
- package/docs/api/dom/lifecycle/idle.md +89 -0
- package/docs/api/dom/lifecycle/visibility.md +73 -0
- package/docs/api/dom/lifecycle/wakeLock.md +94 -0
- package/docs/api/dom/net/README.md +31 -0
- package/docs/api/dom/net/ajax.md +176 -0
- package/docs/api/dom/net/broadcastChannel.md +110 -0
- package/docs/api/dom/net/network.md +137 -0
- package/docs/api/dom/net/sse.md +141 -0
- package/docs/api/dom/net/webrtc.md +158 -0
- package/docs/api/dom/net/ws.md +168 -0
- package/docs/api/dom/query/README.md +30 -0
- package/docs/api/dom/query/dnd.md +137 -0
- package/docs/api/dom/query/dom.md +275 -0
- package/docs/api/dom/query/events.md +211 -0
- package/docs/api/dom/query/gesture.md +137 -0
- package/docs/api/dom/query/media.md +188 -0
- package/docs/api/dom/rendering/README.md +41 -0
- package/docs/api/dom/rendering/chart.md +149 -0
- package/docs/api/dom/rendering/component.md +287 -0
- package/docs/api/dom/rendering/devtools-ui.md +129 -0
- package/docs/api/dom/rendering/devtools.md +157 -0
- package/docs/api/dom/rendering/parser.md +200 -0
- package/docs/api/dom/rendering/reactiveBind.md +234 -0
- package/docs/api/dom/rendering/render.md +219 -0
- package/docs/api/dom/rendering/sanitize.md +97 -0
- package/docs/api/dom/rendering/secPolicy.md +155 -0
- package/docs/api/dom/rendering/template.md +301 -0
- package/docs/api/dom/rendering/themeTokens.md +175 -0
- package/docs/api/dom/rendering/uiSession.md +546 -0
- package/docs/api/dom/rendering/virtualScroll.md +126 -0
- package/docs/api/dom/sensors/README.md +12 -0
- package/docs/api/dom/sensors/battery.md +70 -0
- package/docs/api/dom/sensors/geolocation.md +115 -0
- package/docs/api/dom/sensors/networkInfo.md +73 -0
- package/docs/api/dom/sensors/sensors.md +123 -0
- package/docs/api/dom/sw/README.md +31 -0
- package/docs/api/dom/sw/backgroundSync.md +145 -0
- package/docs/api/dom/sw/cache.md +116 -0
- package/docs/api/dom/sw/push.md +114 -0
- package/docs/api/dom/sw/serviceWorker.md +90 -0
- package/docs/api/dom/sw/sharedWorker.md +131 -0
- package/docs/api/dom/utils/README.md +25 -0
- package/docs/api/dom/utils/a11y.md +143 -0
- package/docs/api/dom/utils/clipboard.md +146 -0
- package/docs/api/dom/utils/entropyCollector.md +175 -0
- package/docs/api/dom/utils/focus.md +140 -0
- package/docs/api/dom/utils/form.md +196 -0
- package/docs/api/dom/utils/formKit.md +181 -0
- package/docs/api/dom/utils/keybindings.md +138 -0
- package/docs/api/dom/utils/leaderElection.md +130 -0
- package/docs/api/dom/utils/notifications.md +106 -0
- package/docs/api/dom/utils/permissions.md +82 -0
- package/docs/api/dom/utils/route.md +112 -0
- package/docs/api/dom/utils/ua.md +119 -0
- package/docs/api/dom/utils/webauthn.md +190 -0
- package/docs/api/io/README.md +20 -0
- package/docs/api/io/binary/README.md +29 -0
- package/docs/api/io/binary/reader.md +126 -0
- package/docs/api/io/binary/writer.md +127 -0
- package/docs/api/io/calc/README.md +22 -0
- package/docs/api/io/calc/adler32.md +75 -0
- package/docs/api/io/calc/bigint.md +105 -0
- package/docs/api/io/calc/crc32.md +74 -0
- package/docs/api/io/calc/easing.md +118 -0
- package/docs/api/io/codec/README.md +35 -0
- package/docs/api/io/codec/b64.md +92 -0
- package/docs/api/io/codec/base32.md +98 -0
- package/docs/api/io/codec/base58.md +104 -0
- package/docs/api/io/codec/buffer.md +144 -0
- package/docs/api/io/codec/cbor.md +179 -0
- package/docs/api/io/codec/csv.md +178 -0
- package/docs/api/io/codec/hex.md +75 -0
- package/docs/api/io/codec/mime.md +156 -0
- package/docs/api/io/codec/msgpack.md +142 -0
- package/docs/api/io/codec/url.md +265 -0
- package/docs/api/io/codec/utf8.md +84 -0
- package/docs/api/io/codec/xml.md +87 -0
- package/docs/api/io/compress/README.md +62 -0
- package/docs/api/io/compress/bitstream.md +131 -0
- package/docs/api/io/compress/brotli.md +232 -0
- package/docs/api/io/compress/brotli_dict.md +119 -0
- package/docs/api/io/compress/brotli_dict_words.md +142 -0
- package/docs/api/io/compress/brotli_frame.md +214 -0
- package/docs/api/io/compress/brotli_shared.md +144 -0
- package/docs/api/io/compress/deflate.md +474 -0
- package/docs/api/io/compress/gzip.md +130 -0
- package/docs/api/io/compress/huffman.md +210 -0
- package/docs/api/io/compress/lz4.md +278 -0
- package/docs/api/io/compress/lz77.md +180 -0
- package/docs/api/io/compress/lzw.md +121 -0
- package/docs/api/io/compress/zip.md +209 -0
- package/docs/api/io/compress/zlib.md +125 -0
- package/docs/api/io/i18n/README.md +23 -0
- package/docs/api/io/i18n/i18n.md +128 -0
- package/docs/api/io/math/README.md +24 -0
- package/docs/api/io/math/fixed-point.md +115 -0
- package/docs/api/io/math/geom.md +144 -0
- package/docs/api/io/math/interp.md +115 -0
- package/docs/api/io/math/linalg.md +138 -0
- package/docs/api/io/math/stats.md +109 -0
- package/docs/api/io/structures/README.md +31 -0
- package/docs/api/io/structures/btree.md +155 -0
- package/docs/api/io/structures/heap.md +166 -0
- package/docs/api/io/structures/lruCache.md +156 -0
- package/docs/api/io/structures/ringBuffer.md +188 -0
- package/docs/api/io/structures/tree-walker.md +132 -0
- package/docs/api/io/structures/trie.md +138 -0
- package/docs/api/io/sync/README.md +29 -0
- package/docs/api/io/sync/abort.md +129 -0
- package/docs/api/io/sync/atomics.md +159 -0
- package/docs/api/io/sync/cancellable.md +176 -0
- package/docs/api/io/sync/channel.md +125 -0
- package/docs/api/io/sync/mutex.md +93 -0
- package/docs/api/io/sync/semaphore.md +106 -0
- package/docs/api/io/sync/tokenBucket.md +139 -0
- package/docs/api/io/text/README.md +23 -0
- package/docs/api/io/text/ansi.md +182 -0
- package/docs/api/io/text/html-entities.md +79 -0
- package/docs/api/io/text/semver.md +158 -0
- package/docs/api/io/text/str.md +129 -0
- package/docs/api/io/text/unicode.md +89 -0
- package/docs/api/io/time/README.md +22 -0
- package/docs/api/io/time/date.md +128 -0
- package/docs/api/io/timing/README.md +32 -0
- package/docs/api/io/timing/clock.md +102 -0
- package/docs/api/io/timing/rateLimit.md +137 -0
- package/docs/api/io/timing/scheduler.md +163 -0
- package/docs/api/io/utils/README.md +30 -0
- package/docs/api/io/utils/bitmap.md +96 -0
- package/docs/api/io/utils/errors.md +165 -0
- package/docs/api/io/utils/eventBus.md +162 -0
- package/docs/api/io/utils/queue.md +141 -0
- package/docs/api/io/utils/signal.md +388 -0
- package/docs/api/io/utils/ui8.md +111 -0
- package/docs/api/io/utils/valid.md +272 -0
- package/docs/api/process/README.md +18 -0
- package/docs/api/process/message.md +166 -0
- package/docs/api/process/rpc.md +161 -0
- package/docs/api/process/workerPool.md +130 -0
- package/docs/api/sanity/base.md +132 -0
- package/docs/api/sanity/community.md +96 -0
- package/docs/api/sanity/lockdown.md +128 -0
- package/docs/api/typed.md +85 -0
- package/docs/dev/README.md +25 -0
- package/docs/dev/provenance.md +80 -0
- package/docs/dev/publishing.md +31 -0
- package/docs/dev/runtime.md +64 -0
- package/docs/dev/testing.md +61 -0
- package/docs/dev/types.md +35 -0
- package/docs/evidence/pqc-hybrid-evidence.md +438 -0
- package/docs/guide/README.md +38 -0
- package/docs/guide/_QUICK_REF.md +341 -0
- package/docs/guide/by-use-case.md +160 -0
- package/docs/guide/doc-format.md +306 -0
- package/docs/guide/gesture-dnd-side-channel.md +119 -0
- package/docs/guide/getting-started.md +134 -0
- package/docs/guide/hmr.md +187 -0
- package/docs/guide/integration-bundlers.md +193 -0
- package/docs/guide/integrations-hmr.md +103 -0
- package/docs/guide/module-creation-workflow.md +342 -0
- package/docs/guide/module-pattern.md +244 -0
- package/docs/guide/rendering-pipeline.md +422 -0
- package/docs/guide/security.md +346 -0
- package/docs/guide/test-format.md +190 -0
- package/docs/guide/tutorial-todo.md +298 -0
- package/docs/guide/typescript.md +215 -0
- package/docs/guide/worker-confinement.md +301 -0
- package/docs/guide/workers.md +168 -0
- package/docs/notes/lz77-deflate-factorization.md +96 -0
- package/docs/notes/worker-confinement-spike.md +302 -0
- package/docs/tools/README.md +56 -0
- package/docs/tools/aot.md +108 -0
- package/docs/tools/audit.md +61 -0
- package/docs/tools/bundler.md +215 -0
- package/docs/tools/codegen.md +64 -0
- package/docs/tools/jsx.md +236 -0
- package/docs/tools/precompilation.md +88 -0
- package/docs/tools/standalone.md +107 -0
- package/fw.config.json +129 -0
- package/integrations/README.md +52 -0
- package/integrations/_shared/catalog.generated.json +207 -0
- package/integrations/_shared/config-resolve.js +201 -0
- package/integrations/_shared/core.js +362 -0
- package/integrations/astro/README.md +96 -0
- package/integrations/astro/index.d.ts +42 -0
- package/integrations/astro/index.js +94 -0
- package/integrations/bun/README.md +62 -0
- package/integrations/bun/index.d.ts +30 -0
- package/integrations/bun/index.js +134 -0
- package/integrations/deno/README.md +55 -0
- package/integrations/deno/deno.json +10 -0
- package/integrations/esbuild/README.md +75 -0
- package/integrations/esbuild/backend.js +147 -0
- package/integrations/esbuild/index.d.ts +32 -0
- package/integrations/esbuild/index.js +147 -0
- package/integrations/eslint/README.md +27 -0
- package/integrations/eslint/no-factory-capture.js +99 -0
- package/integrations/jest/README.md +45 -0
- package/integrations/jest/bun-test-shim.js +43 -0
- package/integrations/nestjs/README.md +68 -0
- package/integrations/nestjs/index.d.ts +38 -0
- package/integrations/nestjs/index.js +99 -0
- package/integrations/nextjs/README.md +149 -0
- package/integrations/nextjs/index.d.ts +30 -0
- package/integrations/nextjs/index.js +98 -0
- package/integrations/nodejs/README.md +46 -0
- package/integrations/nodejs/package.node.example.json +31 -0
- package/integrations/rollup/README.md +65 -0
- package/integrations/rollup/backend.js +132 -0
- package/integrations/rollup/index.d.ts +32 -0
- package/integrations/rollup/index.js +84 -0
- package/integrations/turbopack/README.md +56 -0
- package/integrations/turbopack/index.d.ts +47 -0
- package/integrations/turbopack/index.js +164 -0
- package/integrations/typedoc/README.md +57 -0
- package/integrations/typedoc/categorize.js +121 -0
- package/integrations/typedoc/tsconfig.typedoc.json +14 -0
- package/integrations/typedoc/typedoc.json +19 -0
- package/integrations/vite/README.md +115 -0
- package/integrations/vite/index.d.ts +29 -0
- package/integrations/vite/index.js +182 -0
- package/integrations/vite/package.json +8 -0
- package/integrations/vite/vite-env.d.ts +36 -0
- package/integrations/vitest/README.md +77 -0
- package/integrations/vitest/bun-test-shim.js +92 -0
- package/integrations/vitest/vitest.config.js +41 -0
- package/integrations/webpack/README.md +53 -0
- package/integrations/webpack/index.d.ts +29 -0
- package/integrations/webpack/index.js +182 -0
- package/package.json +303 -0
- package/src/core/logger.js +373 -0
- package/src/core/modules.js +289 -0
- package/src/core/readyState.js +119 -0
- package/src/core/runtime.js +929 -0
- package/src/core/worker-helper.js +261 -0
- package/src/crypto/NIST_CONFORMANCE.md +249 -0
- package/src/crypto/cipher/aes.acvp.md +74 -0
- package/src/crypto/cipher/aes.js +512 -0
- package/src/crypto/cipher/chacha20.acvp.md +117 -0
- package/src/crypto/cipher/chacha20.js +147 -0
- package/src/crypto/hash/adf.acvp.md +144 -0
- package/src/crypto/hash/adf.js +127 -0
- package/src/crypto/hash/argon2.acvp.md +144 -0
- package/src/crypto/hash/argon2.js +517 -0
- package/src/crypto/hash/blake2b.acvp.md +122 -0
- package/src/crypto/hash/blake2b.js +367 -0
- package/src/crypto/hash/hkdf.acvp.md +128 -0
- package/src/crypto/hash/hkdf.js +145 -0
- package/src/crypto/hash/hmac.acvp.md +110 -0
- package/src/crypto/hash/hmac.js +177 -0
- package/src/crypto/hash/pbkdf2.acvp.md +122 -0
- package/src/crypto/hash/pbkdf2.js +120 -0
- package/src/crypto/hash/poly1305.acvp.md +111 -0
- package/src/crypto/hash/poly1305.js +126 -0
- package/src/crypto/hash/sha224.acvp.md +81 -0
- package/src/crypto/hash/sha224.js +60 -0
- package/src/crypto/hash/sha256.acvp.md +75 -0
- package/src/crypto/hash/sha256.js +217 -0
- package/src/crypto/hash/sha3.acvp.md +133 -0
- package/src/crypto/hash/sha3.js +391 -0
- package/src/crypto/hash/sha384.acvp.md +82 -0
- package/src/crypto/hash/sha384.js +61 -0
- package/src/crypto/hash/sha512.acvp.md +84 -0
- package/src/crypto/hash/sha512.js +314 -0
- package/src/crypto/hash/sha512_224.acvp.md +90 -0
- package/src/crypto/hash/sha512_224.js +66 -0
- package/src/crypto/hash/sha512_256.acvp.md +96 -0
- package/src/crypto/hash/sha512_256.js +75 -0
- package/src/crypto/mode/cbc.acvp.md +105 -0
- package/src/crypto/mode/cbc.js +136 -0
- package/src/crypto/mode/chacha20poly1305.acvp.md +116 -0
- package/src/crypto/mode/chacha20poly1305.js +190 -0
- package/src/crypto/mode/cmac.acvp.md +106 -0
- package/src/crypto/mode/cmac.js +172 -0
- package/src/crypto/mode/ctr.acvp.md +110 -0
- package/src/crypto/mode/ctr.js +174 -0
- package/src/crypto/mode/gcm.acvp.md +129 -0
- package/src/crypto/mode/gcm.js +333 -0
- package/src/crypto/mode/kw.acvp.md +145 -0
- package/src/crypto/mode/kw.js +323 -0
- package/src/crypto/pkc/ecc.acvp.md +181 -0
- package/src/crypto/pkc/ecc.js +941 -0
- package/src/crypto/pkc/ed25519.acvp.md +172 -0
- package/src/crypto/pkc/ed25519.js +582 -0
- package/src/crypto/pkc/hybrid-kat.provenance.md +89 -0
- package/src/crypto/pkc/hybridKem.js +255 -0
- package/src/crypto/pkc/hybridSign.js +437 -0
- package/src/crypto/pkc/ml_dsa.acvp.md +146 -0
- package/src/crypto/pkc/ml_dsa.js +984 -0
- package/src/crypto/pkc/ml_kem.acvp.md +117 -0
- package/src/crypto/pkc/ml_kem.js +596 -0
- package/src/crypto/pkc/rsa.acvp.md +187 -0
- package/src/crypto/pkc/rsa.js +470 -0
- package/src/crypto/pkc/slh_dsa.acvp.md +155 -0
- package/src/crypto/pkc/slh_dsa.js +820 -0
- package/src/crypto/pkc/x25519.acvp.md +113 -0
- package/src/crypto/pkc/x25519.js +290 -0
- package/src/crypto/utils/aes_ctr.acvp.md +67 -0
- package/src/crypto/utils/aes_ctr.js +134 -0
- package/src/crypto/utils/aes_modes.acvp.md +66 -0
- package/src/crypto/utils/aes_modes.js +241 -0
- package/src/crypto/utils/asn1-oid.js +369 -0
- package/src/crypto/utils/asn1.js +343 -0
- package/src/crypto/utils/bitArray.js +312 -0
- package/src/crypto/utils/bn.js +825 -0
- package/src/crypto/utils/jws.js +222 -0
- package/src/crypto/utils/keyformat.js +303 -0
- package/src/crypto/utils/pad.js +198 -0
- package/src/crypto/utils/pem.js +90 -0
- package/src/crypto/utils/random.acvp.md +167 -0
- package/src/crypto/utils/random.js +846 -0
- package/src/crypto/utils/rsaKeygen.acvp.md +158 -0
- package/src/crypto/utils/rsaKeygen.js +448 -0
- package/src/crypto/utils/totp.js +409 -0
- package/src/crypto/utils/uuid.acvp.md +137 -0
- package/src/crypto/utils/uuid.js +176 -0
- package/src/crypto/wasm/aes.js +494 -0
- package/src/crypto/wasm/argon2.js +236 -0
- package/src/crypto/wasm/blake2b.js +213 -0
- package/src/crypto/wasm/chacha20poly1305.js +238 -0
- package/src/crypto/wasm/cmac.js +207 -0
- package/src/crypto/wasm/ecc.js +437 -0
- package/src/crypto/wasm/ed25519.js +307 -0
- package/src/crypto/wasm/hkdf.js +183 -0
- package/src/crypto/wasm/hmac.js +215 -0
- package/src/crypto/wasm/ml_dsa.js +375 -0
- package/src/crypto/wasm/ml_kem.js +313 -0
- package/src/crypto/wasm/pbkdf2.js +205 -0
- package/src/crypto/wasm/rsa.js +674 -0
- package/src/crypto/wasm/runtime.js +400 -0
- package/src/crypto/wasm/sha2.js +183 -0
- package/src/crypto/wasm/sha3.js +221 -0
- package/src/crypto/wasm/slh_dsa.js +397 -0
- package/src/crypto/wasm/x25519.js +241 -0
- package/src/crypto/webcrypto/aes.js +370 -0
- package/src/crypto/webcrypto/aeskw.js +185 -0
- package/src/crypto/webcrypto/digest.js +136 -0
- package/src/crypto/webcrypto/ecc.js +371 -0
- package/src/crypto/webcrypto/ed25519.js +248 -0
- package/src/crypto/webcrypto/hkdf.js +132 -0
- package/src/crypto/webcrypto/hmac.js +213 -0
- package/src/crypto/webcrypto/pbkdf2.js +146 -0
- package/src/crypto/webcrypto/rsa.js +415 -0
- package/src/crypto/webcrypto/x25519.js +250 -0
- package/src/dom/display/animate.js +154 -0
- package/src/dom/display/fullscreen.js +305 -0
- package/src/dom/fs/download.js +118 -0
- package/src/dom/fs/fsAccess.js +307 -0
- package/src/dom/fs/indexedDB.js +465 -0
- package/src/dom/fs/remoteStore.js +484 -0
- package/src/dom/fs/storage.js +440 -0
- package/src/dom/lifecycle/idle.js +133 -0
- package/src/dom/lifecycle/visibility.js +140 -0
- package/src/dom/lifecycle/wakeLock.js +187 -0
- package/src/dom/net/ajax.js +303 -0
- package/src/dom/net/broadcastChannel.js +89 -0
- package/src/dom/net/network.js +260 -0
- package/src/dom/net/sse.js +295 -0
- package/src/dom/net/webrtc.js +381 -0
- package/src/dom/net/ws.js +290 -0
- package/src/dom/query/dnd.js +409 -0
- package/src/dom/query/dom.js +831 -0
- package/src/dom/query/events.js +425 -0
- package/src/dom/query/gesture.js +396 -0
- package/src/dom/query/media.js +616 -0
- package/src/dom/rendering/chart.js +663 -0
- package/src/dom/rendering/component.js +469 -0
- package/src/dom/rendering/devtools-ui.js +399 -0
- package/src/dom/rendering/devtools.js +352 -0
- package/src/dom/rendering/parser.js +1055 -0
- package/src/dom/rendering/reactiveBind.js +341 -0
- package/src/dom/rendering/render.js +601 -0
- package/src/dom/rendering/sanitize.js +364 -0
- package/src/dom/rendering/secPolicy.js +281 -0
- package/src/dom/rendering/template.js +1031 -0
- package/src/dom/rendering/themeTokens.js +522 -0
- package/src/dom/rendering/uiSession-core.js +597 -0
- package/src/dom/rendering/uiSession-direct.js +251 -0
- package/src/dom/rendering/uiSession-list.js +751 -0
- package/src/dom/rendering/uiSession.js +145 -0
- package/src/dom/rendering/virtualScroll.js +341 -0
- package/src/dom/sensors/battery.js +153 -0
- package/src/dom/sensors/geolocation.js +156 -0
- package/src/dom/sensors/networkInfo.js +136 -0
- package/src/dom/sensors/sensors.js +340 -0
- package/src/dom/sw/backgroundSync.js +113 -0
- package/src/dom/sw/cache.js +139 -0
- package/src/dom/sw/push.js +181 -0
- package/src/dom/sw/serviceWorker.js +193 -0
- package/src/dom/sw/sharedWorker.js +192 -0
- package/src/dom/utils/a11y.js +244 -0
- package/src/dom/utils/clipboard.js +113 -0
- package/src/dom/utils/entropyCollector.js +344 -0
- package/src/dom/utils/focus.js +421 -0
- package/src/dom/utils/form.js +535 -0
- package/src/dom/utils/formKit.js +427 -0
- package/src/dom/utils/keybindings.js +574 -0
- package/src/dom/utils/leaderElection.js +280 -0
- package/src/dom/utils/notifications.js +218 -0
- package/src/dom/utils/permissions.js +107 -0
- package/src/dom/utils/route.js +482 -0
- package/src/dom/utils/ua.js +109 -0
- package/src/dom/utils/webauthn.js +369 -0
- package/src/external/README.md +15 -0
- package/src/io/binary/reader.js +374 -0
- package/src/io/binary/writer.js +351 -0
- package/src/io/calc/adler32.js +94 -0
- package/src/io/calc/bigint.js +276 -0
- package/src/io/calc/crc32.js +111 -0
- package/src/io/calc/easing.js +514 -0
- package/src/io/codec/b64.js +235 -0
- package/src/io/codec/base32.js +147 -0
- package/src/io/codec/base58.js +167 -0
- package/src/io/codec/buffer.js +630 -0
- package/src/io/codec/cbor.js +550 -0
- package/src/io/codec/csv.js +299 -0
- package/src/io/codec/hex.js +129 -0
- package/src/io/codec/mime.js +398 -0
- package/src/io/codec/msgpack.js +491 -0
- package/src/io/codec/url.js +530 -0
- package/src/io/codec/utf8.js +181 -0
- package/src/io/codec/xml.js +428 -0
- package/src/io/compress/bitstream.js +199 -0
- package/src/io/compress/brotli.js +3073 -0
- package/src/io/compress/brotli_dict.bin +432 -0
- package/src/io/compress/brotli_dict.js +356 -0
- package/src/io/compress/brotli_dict_words.js +157 -0
- package/src/io/compress/brotli_frame.js +420 -0
- package/src/io/compress/brotli_shared.js +715 -0
- package/src/io/compress/deflate.js +1432 -0
- package/src/io/compress/gzip.js +406 -0
- package/src/io/compress/huffman.js +322 -0
- package/src/io/compress/lz4.js +451 -0
- package/src/io/compress/lz77.js +408 -0
- package/src/io/compress/lzw.js +332 -0
- package/src/io/compress/zip.js +815 -0
- package/src/io/compress/zlib.js +340 -0
- package/src/io/i18n/i18n.js +236 -0
- package/src/io/math/fixed-point.js +269 -0
- package/src/io/math/geom.js +350 -0
- package/src/io/math/interp.js +263 -0
- package/src/io/math/linalg.js +472 -0
- package/src/io/math/stats.js +339 -0
- package/src/io/structures/btree.js +357 -0
- package/src/io/structures/heap.js +249 -0
- package/src/io/structures/lruCache.js +219 -0
- package/src/io/structures/ringBuffer.js +208 -0
- package/src/io/structures/tree-walker.js +413 -0
- package/src/io/structures/trie.js +219 -0
- package/src/io/sync/abort.js +196 -0
- package/src/io/sync/atomics.js +342 -0
- package/src/io/sync/cancellable.js +279 -0
- package/src/io/sync/channel.js +301 -0
- package/src/io/sync/mutex.js +148 -0
- package/src/io/sync/semaphore.js +156 -0
- package/src/io/sync/tokenBucket.js +208 -0
- package/src/io/text/ansi.js +536 -0
- package/src/io/text/html-entities.js +143 -0
- package/src/io/text/semver.js +375 -0
- package/src/io/text/str.js +243 -0
- package/src/io/text/unicode.js +188 -0
- package/src/io/time/date.js +355 -0
- package/src/io/timing/clock.js +79 -0
- package/src/io/timing/rateLimit.js +264 -0
- package/src/io/timing/scheduler.js +351 -0
- package/src/io/utils/bitmap.js +94 -0
- package/src/io/utils/errors.js +269 -0
- package/src/io/utils/eventBus.js +315 -0
- package/src/io/utils/queue.js +223 -0
- package/src/io/utils/signal.js +858 -0
- package/src/io/utils/ui8.js +99 -0
- package/src/io/utils/valid.js +556 -0
- package/src/main.js +41 -0
- package/src/polyfill/README.md +9 -0
- package/src/process/message.js +257 -0
- package/src/process/rpc.js +286 -0
- package/src/process/workerPool.js +392 -0
- package/src/sanity/base.js +374 -0
- package/src/sanity/community.js +254 -0
- package/src/sanity/lockdown-apply.js +58 -0
- package/src/sanity/lockdown.js +408 -0
- package/src/sanity/wasm-gate.js +316 -0
- package/src/typed.js +53 -0
- package/third-party/NOTICE-penner-easing +88 -0
- package/third-party/NOTICE-sjcl +50 -0
- package/tools/_lib/cli-help.js +55 -0
- package/tools/rendering/aot/index.js +148 -0
- package/tools/rendering/aot/lib/dom-codegen.js +295 -0
- package/tools/rendering/jsx/index.js +654 -0
- package/tools/rendering/precompilation/index.js +368 -0
- package/types/registry.generated.d.ts +217 -0
- package/types/typed.d.ts +106 -0
|
@@ -0,0 +1,941 @@
|
|
|
1
|
+
// Copyright (c) 2026 AwaCloud SAS
|
|
2
|
+
// Author: Matthieu Bouilloux
|
|
3
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @fileoverview Elliptic-curve cryptography (NIST P-* and Koblitz K-* curves).
|
|
7
|
+
*
|
|
8
|
+
* Provides:
|
|
9
|
+
* - affine and Jacobian point arithmetic,
|
|
10
|
+
* - the curve registry (`curves.c192…c521`, `k192…k256`),
|
|
11
|
+
* - El-Gamal-style KEM/DH (`elGamal`),
|
|
12
|
+
* - ECDSA sign/verify (`ecdsa`),
|
|
13
|
+
* - serialize / deserialize for both key types.
|
|
14
|
+
*
|
|
15
|
+
* Origin: the affine / Jacobian point arithmetic, the curve registry and the
|
|
16
|
+
* basic key / ECDSA scaffolding are adapted from the Stanford JavaScript
|
|
17
|
+
* Crypto Library (SJCL), BSD-2-Clause (SJCL is dual-licensed BSD-2-Clause OR
|
|
18
|
+
* GPL-2.0-or-later; the BSD-2-Clause terms are retained, see
|
|
19
|
+
* third-party/NOTICE-sjcl); RFC 6979, the input validation, the ESM factory,
|
|
20
|
+
* JSDoc, tests and every later change are this project's own work. See
|
|
21
|
+
* docs/dev/provenance.md.
|
|
22
|
+
*
|
|
23
|
+
* Hash family for KEM/DH is selectable via the `bits` argument
|
|
24
|
+
* (256 → SHA-256, 384 → SHA-384, 512 → SHA-512).
|
|
25
|
+
*
|
|
26
|
+
* ## Recommended curve subset
|
|
27
|
+
*
|
|
28
|
+
* For new applications, prefer **P-256, P-384, P-521** (FIPS 186-5 §3.2.1).
|
|
29
|
+
* The legacy curves P-192/P-224 and the Koblitz K-* family are exposed for
|
|
30
|
+
* interop with older systems only; they are NOT recommended for new use and
|
|
31
|
+
* P-192 in particular is below the modern 112-bit security floor.
|
|
32
|
+
*
|
|
33
|
+
* ## ECDSA nonce
|
|
34
|
+
*
|
|
35
|
+
* ECDSA signing uses **RFC 6979 deterministic k** by default (see
|
|
36
|
+
* `_rfc6979K`). This eliminates the catastrophic nonce-reuse class of
|
|
37
|
+
* failures even when the host CSPRNG is broken. `opts.deterministic === false`
|
|
38
|
+
* falls back to CSPRNG-derived k.
|
|
39
|
+
*
|
|
40
|
+
* ## Side-channel posture
|
|
41
|
+
*
|
|
42
|
+
* The scalar-multiplication path uses a 4-bit windowed method with a
|
|
43
|
+
* precomputed multiples table (`point.mult` / `point.mult2`). The table
|
|
44
|
+
* index is the scalar nibble, so this is **NOT constant-time against a
|
|
45
|
+
* cache-timing adversary** - secret scalars (ECDSA `k`, ECDH private key)
|
|
46
|
+
* could leak via cache-line access patterns on a co-resident attacker.
|
|
47
|
+
* In a browser/Node JS environment with no shared-cache adversary this is
|
|
48
|
+
* acceptable; for server-side deployments with adversarial co-tenancy,
|
|
49
|
+
* prefer a constant-time implementation (e.g. WebCrypto subtle.* over
|
|
50
|
+
* curves the platform supports, or a Montgomery-ladder X25519 / Ed25519
|
|
51
|
+
* for ECDH / signatures).
|
|
52
|
+
*
|
|
53
|
+
*/
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Affine point instance on a curve.
|
|
57
|
+
* @typedef {object} EccPointInstance
|
|
58
|
+
* @property {boolean} isIdentity
|
|
59
|
+
* @property {*} [x]
|
|
60
|
+
* @property {*} [y]
|
|
61
|
+
* @property {EccCurveInstance} curve
|
|
62
|
+
* @property {() => EccPointJacInstance} toJac
|
|
63
|
+
* @property {(k: *) => EccPointInstance} mult
|
|
64
|
+
* @property {(k: *, k2: *, affine2: EccPointInstance) => EccPointInstance} mult2
|
|
65
|
+
* @property {() => EccPointInstance[]} multiples
|
|
66
|
+
* @property {() => EccPointInstance} negate
|
|
67
|
+
* @property {() => boolean} isValid
|
|
68
|
+
* @property {() => number[]} toBits
|
|
69
|
+
*/
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Constructor for `ecc.point`.
|
|
73
|
+
* @typedef {{ new (curve: EccCurveInstance, x?: *, y?: *): EccPointInstance }} EccPointCtor
|
|
74
|
+
*/
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Jacobian-coordinate point instance.
|
|
78
|
+
* @typedef {object} EccPointJacInstance
|
|
79
|
+
* @property {boolean} isIdentity
|
|
80
|
+
* @property {*} [x]
|
|
81
|
+
* @property {*} [y]
|
|
82
|
+
* @property {*} [z]
|
|
83
|
+
* @property {EccCurveInstance} curve
|
|
84
|
+
* @property {(T: EccPointJacInstance) => (EccPointJacInstance|false)} add
|
|
85
|
+
* @property {() => EccPointJacInstance} doubl
|
|
86
|
+
* @property {() => EccPointInstance} toAffine
|
|
87
|
+
* @property {(k: *, affine: EccPointInstance) => EccPointJacInstance} mult
|
|
88
|
+
* @property {(k1: *, affine: EccPointInstance, k2: *, affine2: EccPointInstance) => EccPointJacInstance} mult2
|
|
89
|
+
* @property {() => EccPointJacInstance} negate
|
|
90
|
+
* @property {() => boolean} isValid
|
|
91
|
+
*/
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Constructor for `ecc.pointJac`. Static method `toAffineMultiple` is also exposed.
|
|
95
|
+
* @typedef {{ new (curve: EccCurveInstance, x?: *, y?: *, z?: *): EccPointJacInstance, toAffineMultiple: (points: EccPointJacInstance[]) => EccPointInstance[] }} EccPointJacCtor
|
|
96
|
+
*/
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Curve instance built via `new ecc.curve(...)`.
|
|
100
|
+
* @typedef {object} EccCurveInstance
|
|
101
|
+
* @property {*} field
|
|
102
|
+
* @property {*} r
|
|
103
|
+
* @property {*} a
|
|
104
|
+
* @property {*} b
|
|
105
|
+
* @property {EccPointInstance} G
|
|
106
|
+
* @property {(bits: number[]) => (EccPointInstance|false)} fromBits
|
|
107
|
+
*/
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Constructor for `ecc.curve`.
|
|
111
|
+
* @typedef {{ new (Field: *, r: *, a: *, b: *, x: *, y: *): EccCurveInstance }} EccCurveCtor
|
|
112
|
+
*/
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Public-key instance shared by `elGamal` and `ecdsa`.
|
|
116
|
+
* @typedef {object} EccPublicKeyInstance
|
|
117
|
+
* @property {() => object} serialize
|
|
118
|
+
* @property {() => { x: number[], y: number[] }} get
|
|
119
|
+
* @property {() => string} getType
|
|
120
|
+
*/
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Constructor for a publicKey (elGamal / ecdsa).
|
|
124
|
+
* @typedef {{ new (curve: EccCurveInstance, point: EccPointInstance|number[]): EccPublicKeyInstance }} EccPublicKeyCtor
|
|
125
|
+
*/
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Secret-key instance shared by `elGamal` and `ecdsa`.
|
|
129
|
+
* @typedef {object} EccSecretKeyInstance
|
|
130
|
+
* @property {() => object} serialize
|
|
131
|
+
* @property {() => number[]} get
|
|
132
|
+
* @property {() => string} getType
|
|
133
|
+
*/
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Constructor for a secretKey (elGamal / ecdsa).
|
|
137
|
+
* @typedef {{ new (curve: EccCurveInstance, exponent: *): EccSecretKeyInstance }} EccSecretKeyCtor
|
|
138
|
+
*/
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Public surface of `ecc.factory(...)`.
|
|
142
|
+
* @typedef {object} EccApi
|
|
143
|
+
* @property {EccPointCtor} point
|
|
144
|
+
* @property {EccPointJacCtor} pointJac
|
|
145
|
+
* @property {EccCurveCtor} curve
|
|
146
|
+
* @property {Object<string, EccCurveInstance>} curves
|
|
147
|
+
* @property {(curve: EccCurveInstance) => (string|false)} curveName
|
|
148
|
+
* @property {(key: object) => (EccPublicKeyInstance|EccSecretKeyInstance|false)} deserialize
|
|
149
|
+
* @property {{ publicKey: EccPublicKeyCtor, secretKey: EccSecretKeyCtor, generateKeys: (cn: string) => Function }} basicKey
|
|
150
|
+
* @property {{ generateKeys: Function, publicKey: EccPublicKeyCtor, secretKey: EccSecretKeyCtor }} elGamal
|
|
151
|
+
* @property {{ generateKeys: Function, publicKey: EccPublicKeyCtor, secretKey: EccSecretKeyCtor }} ecdsa
|
|
152
|
+
* @property {object} _internal
|
|
153
|
+
*/
|
|
154
|
+
|
|
155
|
+
import { bitArray } from '../utils/bitArray.js';
|
|
156
|
+
import { hex } from '../../io/codec/hex.js';
|
|
157
|
+
import { bn } from '../utils/bn.js';
|
|
158
|
+
import { sha256 } from '../hash/sha256.js';
|
|
159
|
+
import { sha384 } from '../hash/sha384.js';
|
|
160
|
+
import { sha512 } from '../hash/sha512.js';
|
|
161
|
+
import { hmac } from '../hash/hmac.js';
|
|
162
|
+
|
|
163
|
+
export const ecc = {
|
|
164
|
+
name: 'ecc',
|
|
165
|
+
version: '1.0.0',
|
|
166
|
+
type: 'fw.crypto.pkc',
|
|
167
|
+
dependencies: ['bitArray', 'hex', 'bn', 'sha256', 'sha384', 'sha512', 'hmac'],
|
|
168
|
+
deps: [bitArray, hex, bn, sha256, sha384, sha512, hmac],
|
|
169
|
+
|
|
170
|
+
/** @returns {EccApi} */
|
|
171
|
+
factory(bitArray, hex, bn, sha256, sha384, sha512, hmac) {
|
|
172
|
+
|
|
173
|
+
const hashes = { 256: sha256, 384: sha384, 512: sha512 };
|
|
174
|
+
|
|
175
|
+
function _hashForBits(bits) {
|
|
176
|
+
if (bits <= 256) return sha256;
|
|
177
|
+
if (bits <= 384) return sha384;
|
|
178
|
+
return sha512;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
function _concatBytes(parts) {
|
|
182
|
+
let len = 0;
|
|
183
|
+
for (let i = 0; i < parts.length; i++) len += parts[i].length;
|
|
184
|
+
const out = new Uint8Array(len);
|
|
185
|
+
let off = 0;
|
|
186
|
+
for (let i = 0; i < parts.length; i++) { out.set(parts[i], off); off += parts[i].length; }
|
|
187
|
+
return out;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
function _hmacBytes(Hash, keyBytes, msgBytes) {
|
|
191
|
+
const m = new hmac.fn(bitArray.ui8_to_ba(keyBytes), Hash);
|
|
192
|
+
return bitArray.ba_to_ui8(m.encrypt(bitArray.ui8_to_ba(msgBytes)));
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
function _intToOctets(x, rolen) {
|
|
196
|
+
const bits = x.toBits(rolen * 8);
|
|
197
|
+
const out = bitArray.ba_to_ui8(bits);
|
|
198
|
+
if (out.length === rolen) return out;
|
|
199
|
+
const padded = new Uint8Array(rolen);
|
|
200
|
+
padded.set(out, rolen - out.length);
|
|
201
|
+
return padded;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
function _bitsToInt(bs, qlen) {
|
|
205
|
+
const blen = bitArray.bitLength(bs);
|
|
206
|
+
let truncated = bs;
|
|
207
|
+
if (blen > qlen) truncated = bitArray.clamp(bs, qlen);
|
|
208
|
+
return bn.fromBits(truncated);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
function _bitsToOctets(bs, R, rolen, qlen) {
|
|
212
|
+
const z1 = _bitsToInt(bs, qlen);
|
|
213
|
+
const z2 = z1.greaterEquals(R) ? z1.sub(R).normalize() : z1;
|
|
214
|
+
return _intToOctets(z2, rolen);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
// True (unrounded) bit-length of a positive integer encoded as a
|
|
218
|
+
// big-endian byte array. SJCL `bn.bitLength()` rounds up to the next
|
|
219
|
+
// multiple of 16 (storage radix), which breaks RFC 6979 for P-521
|
|
220
|
+
// where the curve order n has bit-length 521 (not 528). Iteration C2
|
|
221
|
+
// of the FIPS 140-3 upgrade plan - fixes the byte-exact divergence
|
|
222
|
+
// against RFC 6979 §A.2.7 P-521 sample.
|
|
223
|
+
function _trueBitLength(R) {
|
|
224
|
+
const bytes = bitArray.ba_to_ui8(R.toBits());
|
|
225
|
+
let i = 0;
|
|
226
|
+
while (i < bytes.length && bytes[i] === 0) i++;
|
|
227
|
+
if (i === bytes.length) return 0;
|
|
228
|
+
let bits = (bytes.length - i) * 8;
|
|
229
|
+
let b = bytes[i];
|
|
230
|
+
while ((b & 0x80) === 0) { bits--; b = (b << 1) & 0xff; }
|
|
231
|
+
return bits;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
// RFC 6979 §3.2 deterministic k generation.
|
|
235
|
+
function _rfc6979K(hashBits, x, R, Hash) {
|
|
236
|
+
const qlen = _trueBitLength(R);
|
|
237
|
+
const rolen = (qlen + 7) >>> 3;
|
|
238
|
+
const xOct = _intToOctets(x, rolen);
|
|
239
|
+
const hOct = _bitsToOctets(hashBits, R, rolen, qlen);
|
|
240
|
+
const holen = bitArray.bitLength(Hash.hash([])) / 8;
|
|
241
|
+
|
|
242
|
+
let V = new Uint8Array(holen).fill(0x01);
|
|
243
|
+
let K = new Uint8Array(holen);
|
|
244
|
+
const z = new Uint8Array([0x00]);
|
|
245
|
+
const o = new Uint8Array([0x01]);
|
|
246
|
+
|
|
247
|
+
K = _hmacBytes(Hash, K, _concatBytes([V, z, xOct, hOct]));
|
|
248
|
+
V = _hmacBytes(Hash, K, V);
|
|
249
|
+
K = _hmacBytes(Hash, K, _concatBytes([V, o, xOct, hOct]));
|
|
250
|
+
V = _hmacBytes(Hash, K, V);
|
|
251
|
+
|
|
252
|
+
for (;;) {
|
|
253
|
+
let T = new Uint8Array(0);
|
|
254
|
+
while (T.length * 8 < qlen) {
|
|
255
|
+
V = _hmacBytes(Hash, K, V);
|
|
256
|
+
T = _concatBytes([T, V]);
|
|
257
|
+
}
|
|
258
|
+
const k = _bitsToInt(bitArray.ui8_to_ba(T), qlen);
|
|
259
|
+
if (!k.equals(0) && !k.greaterEquals(R)) return k;
|
|
260
|
+
K = _hmacBytes(Hash, K, _concatBytes([V, z]));
|
|
261
|
+
V = _hmacBytes(Hash, K, V);
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
const ecc = {};
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* Affine point on a curve.
|
|
269
|
+
* @constructor
|
|
270
|
+
*/
|
|
271
|
+
ecc.point = function (curve, x, y) {
|
|
272
|
+
if (x === undefined) {
|
|
273
|
+
this.isIdentity = true;
|
|
274
|
+
} else {
|
|
275
|
+
if (x instanceof bn.bn) x = new curve.field(x);
|
|
276
|
+
if (y instanceof bn.bn) y = new curve.field(y);
|
|
277
|
+
this.x = x;
|
|
278
|
+
this.y = y;
|
|
279
|
+
this.isIdentity = false;
|
|
280
|
+
}
|
|
281
|
+
this.curve = curve;
|
|
282
|
+
};
|
|
283
|
+
|
|
284
|
+
ecc.point.prototype = {
|
|
285
|
+
toJac() {
|
|
286
|
+
return new ecc.pointJac(this.curve, this.x, this.y, new this.curve.field(1));
|
|
287
|
+
},
|
|
288
|
+
|
|
289
|
+
mult(k) {
|
|
290
|
+
return this.toJac().mult(k, this).toAffine();
|
|
291
|
+
},
|
|
292
|
+
|
|
293
|
+
mult2(k, k2, affine2) {
|
|
294
|
+
return this.toJac().mult2(k, this, k2, affine2).toAffine();
|
|
295
|
+
},
|
|
296
|
+
|
|
297
|
+
multiples() {
|
|
298
|
+
if (this._multiples === undefined) {
|
|
299
|
+
let j = this.toJac().doubl();
|
|
300
|
+
const m = [j];
|
|
301
|
+
for (let i = 3; i < 16; i++) {
|
|
302
|
+
j = j.add(this);
|
|
303
|
+
m.push(j);
|
|
304
|
+
}
|
|
305
|
+
this._multiples = [new ecc.point(this.curve), this].concat(ecc.pointJac.toAffineMultiple(m));
|
|
306
|
+
}
|
|
307
|
+
return this._multiples;
|
|
308
|
+
},
|
|
309
|
+
|
|
310
|
+
negate() {
|
|
311
|
+
const newY = new this.curve.field(0).sub(this.y).normalize().reduce();
|
|
312
|
+
return new ecc.point(this.curve, this.x, newY);
|
|
313
|
+
},
|
|
314
|
+
|
|
315
|
+
isValid() {
|
|
316
|
+
return this.y.square().equals(this.curve.b.add(this.x.mul(this.curve.a.add(this.x.square()))));
|
|
317
|
+
},
|
|
318
|
+
|
|
319
|
+
toBits() {
|
|
320
|
+
return bitArray.concat(this.x.toBits(), this.y.toBits());
|
|
321
|
+
}
|
|
322
|
+
};
|
|
323
|
+
|
|
324
|
+
/**
|
|
325
|
+
* Jacobian-coordinate point.
|
|
326
|
+
* @constructor
|
|
327
|
+
*/
|
|
328
|
+
ecc.pointJac = function (curve, x, y, z) {
|
|
329
|
+
if (x === undefined) {
|
|
330
|
+
this.isIdentity = true;
|
|
331
|
+
} else {
|
|
332
|
+
this.x = x;
|
|
333
|
+
this.y = y;
|
|
334
|
+
this.z = z;
|
|
335
|
+
this.isIdentity = false;
|
|
336
|
+
}
|
|
337
|
+
this.curve = curve;
|
|
338
|
+
};
|
|
339
|
+
|
|
340
|
+
ecc.pointJac.toAffineMultiple = function (points) {
|
|
341
|
+
let i = 0, j, p, tmp, z, zi, zi2, curve;
|
|
342
|
+
const ret = new Array(points.length);
|
|
343
|
+
for (; i < points.length; i++) {
|
|
344
|
+
p = points[i];
|
|
345
|
+
if (curve !== p.curve) {
|
|
346
|
+
if (curve) {
|
|
347
|
+
for (i = 0; i < points.length; i++) {
|
|
348
|
+
ret[i] = points[i].toAffine();
|
|
349
|
+
}
|
|
350
|
+
return ret;
|
|
351
|
+
}
|
|
352
|
+
curve = p.curve;
|
|
353
|
+
}
|
|
354
|
+
if (!p.isIdentity && !p.z.equals(0)) {
|
|
355
|
+
if (tmp) {
|
|
356
|
+
// @ts-ignore -- z is always set before tmp becomes truthy
|
|
357
|
+
tmp.push(z);
|
|
358
|
+
// @ts-ignore -- z is always defined here (set in else branch before tmp is truthy)
|
|
359
|
+
z = z.mul(p.z);
|
|
360
|
+
} else {
|
|
361
|
+
z = p.z;
|
|
362
|
+
tmp = [];
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
if (tmp) {
|
|
367
|
+
z = z.inverse();
|
|
368
|
+
j = tmp.length - 1;
|
|
369
|
+
}
|
|
370
|
+
for (i--; i >= 0; i--) {
|
|
371
|
+
p = points[i];
|
|
372
|
+
if (p.isIdentity || p.z.equals(0)) {
|
|
373
|
+
ret[i] = new ecc.point(p.curve);
|
|
374
|
+
} else {
|
|
375
|
+
if (j >= 0) {
|
|
376
|
+
zi = z.mul(tmp[j]);
|
|
377
|
+
z = z.mul(p.z);
|
|
378
|
+
j--;
|
|
379
|
+
} else {
|
|
380
|
+
zi = z;
|
|
381
|
+
}
|
|
382
|
+
zi2 = zi.square();
|
|
383
|
+
ret[i] = new ecc.point(p.curve, p.x.mul(zi2).fullReduce(), p.y.mul(zi2.mul(zi)).fullReduce());
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
return ret;
|
|
387
|
+
};
|
|
388
|
+
|
|
389
|
+
ecc.pointJac.prototype = {
|
|
390
|
+
add(T) {
|
|
391
|
+
const S = this;
|
|
392
|
+
if (S.curve !== T.curve) {
|
|
393
|
+
console.warn('[crypto] INVALID: ecc.add: points must be on the same curve');
|
|
394
|
+
return false;
|
|
395
|
+
}
|
|
396
|
+
if (S.isIdentity) return T.toJac();
|
|
397
|
+
if (T.isIdentity) return S;
|
|
398
|
+
|
|
399
|
+
const sz2 = S.z.square();
|
|
400
|
+
const c = T.x.mul(sz2).subM(S.x);
|
|
401
|
+
|
|
402
|
+
if (c.equals(0)) {
|
|
403
|
+
if (S.y.equals(T.y.mul(sz2.mul(S.z)))) {
|
|
404
|
+
return S.doubl();
|
|
405
|
+
}
|
|
406
|
+
return new ecc.pointJac(S.curve);
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
const d = T.y.mul(sz2.mul(S.z)).subM(S.y);
|
|
410
|
+
const c2 = c.square();
|
|
411
|
+
|
|
412
|
+
const x1 = d.square();
|
|
413
|
+
const x2 = c.square().mul(c).addM(S.x.add(S.x).mul(c2));
|
|
414
|
+
const x = x1.subM(x2);
|
|
415
|
+
|
|
416
|
+
const y1 = S.x.mul(c2).subM(x).mul(d);
|
|
417
|
+
const y2 = S.y.mul(c.square().mul(c));
|
|
418
|
+
const y = y1.subM(y2);
|
|
419
|
+
|
|
420
|
+
const z = S.z.mul(c);
|
|
421
|
+
|
|
422
|
+
return new ecc.pointJac(this.curve, x, y, z);
|
|
423
|
+
},
|
|
424
|
+
|
|
425
|
+
doubl() {
|
|
426
|
+
if (this.isIdentity) return this;
|
|
427
|
+
|
|
428
|
+
const y2 = this.y.square();
|
|
429
|
+
const a = y2.mul(this.x.mul(4));
|
|
430
|
+
const b = y2.square().mul(8);
|
|
431
|
+
const z2 = this.z.square();
|
|
432
|
+
const c = this.curve.a.toHex() === (new bn.bn(-3)).toHex()
|
|
433
|
+
? this.x.sub(z2).mul(3).mul(this.x.add(z2))
|
|
434
|
+
: this.x.square().mul(3).add(z2.square().mul(this.curve.a));
|
|
435
|
+
const x = c.square().subM(a).subM(a);
|
|
436
|
+
const y = a.sub(x).mul(c).subM(b);
|
|
437
|
+
const z = this.y.add(this.y).mul(this.z);
|
|
438
|
+
return new ecc.pointJac(this.curve, x, y, z);
|
|
439
|
+
},
|
|
440
|
+
|
|
441
|
+
toAffine() {
|
|
442
|
+
if (this.isIdentity || this.z.equals(0)) {
|
|
443
|
+
return new ecc.point(this.curve);
|
|
444
|
+
}
|
|
445
|
+
const zi = this.z.inverse();
|
|
446
|
+
const zi2 = zi.square();
|
|
447
|
+
return new ecc.point(this.curve, this.x.mul(zi2).fullReduce(), this.y.mul(zi2.mul(zi)).fullReduce());
|
|
448
|
+
},
|
|
449
|
+
|
|
450
|
+
mult(k, affine) {
|
|
451
|
+
if (typeof k === 'number') {
|
|
452
|
+
k = [k];
|
|
453
|
+
} else if (k.limbs !== undefined) {
|
|
454
|
+
k = k.normalize().limbs;
|
|
455
|
+
}
|
|
456
|
+
let out = new ecc.point(this.curve).toJac();
|
|
457
|
+
const multiples = affine.multiples();
|
|
458
|
+
|
|
459
|
+
for (let i = k.length - 1; i >= 0; i--) {
|
|
460
|
+
for (let j = bn.bn.prototype.radix - 4; j >= 0; j -= 4) {
|
|
461
|
+
out = out.doubl().doubl().doubl().doubl().add(multiples[k[i] >> j & 0xF]);
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
return out;
|
|
465
|
+
},
|
|
466
|
+
|
|
467
|
+
mult2(k1, affine, k2, affine2) {
|
|
468
|
+
if (typeof k1 === 'number') {
|
|
469
|
+
k1 = [k1];
|
|
470
|
+
} else if (k1.limbs !== undefined) {
|
|
471
|
+
k1 = k1.normalize().limbs;
|
|
472
|
+
}
|
|
473
|
+
if (typeof k2 === 'number') {
|
|
474
|
+
k2 = [k2];
|
|
475
|
+
} else if (k2.limbs !== undefined) {
|
|
476
|
+
k2 = k2.normalize().limbs;
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
let out = new ecc.point(this.curve).toJac();
|
|
480
|
+
const m1 = affine.multiples();
|
|
481
|
+
const m2 = affine2.multiples();
|
|
482
|
+
|
|
483
|
+
for (let i = Math.max(k1.length, k2.length) - 1; i >= 0; i--) {
|
|
484
|
+
const l1 = k1[i] | 0;
|
|
485
|
+
const l2 = k2[i] | 0;
|
|
486
|
+
for (let j = bn.bn.prototype.radix - 4; j >= 0; j -= 4) {
|
|
487
|
+
out = out.doubl().doubl().doubl().doubl().add(m1[l1 >> j & 0xF]).add(m2[l2 >> j & 0xF]);
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
return out;
|
|
491
|
+
},
|
|
492
|
+
|
|
493
|
+
negate() {
|
|
494
|
+
return this.toAffine().negate().toJac();
|
|
495
|
+
},
|
|
496
|
+
|
|
497
|
+
isValid() {
|
|
498
|
+
const z2 = this.z.square();
|
|
499
|
+
const z4 = z2.square();
|
|
500
|
+
const z6 = z4.mul(z2);
|
|
501
|
+
return this.y.square().equals(
|
|
502
|
+
this.curve.b.mul(z6).add(this.x.mul(
|
|
503
|
+
this.curve.a.mul(z4).add(this.x.square())))
|
|
504
|
+
);
|
|
505
|
+
}
|
|
506
|
+
};
|
|
507
|
+
|
|
508
|
+
/**
|
|
509
|
+
* Build an elliptic curve.
|
|
510
|
+
* @constructor
|
|
511
|
+
*/
|
|
512
|
+
ecc.curve = function (Field, r, a, b, x, y) {
|
|
513
|
+
this.field = Field;
|
|
514
|
+
this.r = new bn.bn(r);
|
|
515
|
+
this.a = new Field(a);
|
|
516
|
+
this.b = new Field(b);
|
|
517
|
+
this.G = new ecc.point(this, new Field(x), new Field(y));
|
|
518
|
+
};
|
|
519
|
+
|
|
520
|
+
ecc.curve.prototype.fromBits = function (bits) {
|
|
521
|
+
const l = this.field.prototype.exponent + 7 & -8;
|
|
522
|
+
const p = new ecc.point(this,
|
|
523
|
+
this.field.fromBits(bitArray.bitSlice(bits, 0, l)),
|
|
524
|
+
this.field.fromBits(bitArray.bitSlice(bits, l, 2 * l)));
|
|
525
|
+
if (!p.isValid()) {
|
|
526
|
+
console.error('[crypto] CORRUPT: ecc: point not on the curve');
|
|
527
|
+
return false;
|
|
528
|
+
}
|
|
529
|
+
return p;
|
|
530
|
+
};
|
|
531
|
+
|
|
532
|
+
ecc.curves = {
|
|
533
|
+
c192: new ecc.curve(
|
|
534
|
+
bn.prime.p192,
|
|
535
|
+
'0xffffffffffffffffffffffff99def836146bc9b1b4d22831',
|
|
536
|
+
-3,
|
|
537
|
+
'0x64210519e59c80e70fa7e9ab72243049feb8deecc146b9b1',
|
|
538
|
+
'0x188da80eb03090f67cbf20eb43a18800f4ff0afd82ff1012',
|
|
539
|
+
'0x07192b95ffc8da78631011ed6b24cdd573f977a11e794811'),
|
|
540
|
+
|
|
541
|
+
c224: new ecc.curve(
|
|
542
|
+
bn.prime.p224,
|
|
543
|
+
'0xffffffffffffffffffffffffffff16a2e0b8f03e13dd29455c5c2a3d',
|
|
544
|
+
-3,
|
|
545
|
+
'0xb4050a850c04b3abf54132565044b0b7d7bfd8ba270b39432355ffb4',
|
|
546
|
+
'0xb70e0cbd6bb4bf7f321390b94a03c1d356c21122343280d6115c1d21',
|
|
547
|
+
'0xbd376388b5f723fb4c22dfe6cd4375a05a07476444d5819985007e34'),
|
|
548
|
+
|
|
549
|
+
c256: new ecc.curve(
|
|
550
|
+
bn.prime.p256,
|
|
551
|
+
'0xffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551',
|
|
552
|
+
-3,
|
|
553
|
+
'0x5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b',
|
|
554
|
+
'0x6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296',
|
|
555
|
+
'0x4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5'),
|
|
556
|
+
|
|
557
|
+
c384: new ecc.curve(
|
|
558
|
+
bn.prime.p384,
|
|
559
|
+
'0xffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52973',
|
|
560
|
+
-3,
|
|
561
|
+
'0xb3312fa7e23ee7e4988e056be3f82d19181d9c6efe8141120314088f5013875ac656398d8a2ed19d2a85c8edd3ec2aef',
|
|
562
|
+
'0xaa87ca22be8b05378eb1c71ef320ad746e1d3b628ba79b9859f741e082542a385502f25dbf55296c3a545e3872760ab7',
|
|
563
|
+
'0x3617de4a96262c6f5d9e98bf9292dc29f8f41dbd289a147ce9da3113b5f0b8c00a60b1ce1d7e819d7a431d7c90ea0e5f'),
|
|
564
|
+
|
|
565
|
+
c521: new ecc.curve(
|
|
566
|
+
bn.prime.p521,
|
|
567
|
+
'0x1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA51868783BF2F966B7FCC0148F709A5D03BB5C9B8899C47AEBB6FB71E91386409',
|
|
568
|
+
-3,
|
|
569
|
+
'0x051953EB9618E1C9A1F929A21A0B68540EEA2DA725B99B315F3B8B489918EF109E156193951EC7E937B1652C0BD3BB1BF073573DF883D2C34F1EF451FD46B503F00',
|
|
570
|
+
'0xC6858E06B70404E9CD9E3ECB662395B4429C648139053FB521F828AF606B4D3DBAA14B5E77EFE75928FE1DC127A2FFA8DE3348B3C1856A429BF97E7E31C2E5BD66',
|
|
571
|
+
'0x11839296A789A3BC0045C8A5FB42C7D1BD998F54449579B446817AFBD17273E662C97EE72995EF42640C550B9013FAD0761353C7086A272C24088BE94769FD16650'),
|
|
572
|
+
|
|
573
|
+
k192: new ecc.curve(
|
|
574
|
+
bn.prime.p192k,
|
|
575
|
+
'0xfffffffffffffffffffffffe26f2fc170f69466a74defd8d',
|
|
576
|
+
0,
|
|
577
|
+
3,
|
|
578
|
+
'0xdb4ff10ec057e9ae26b07d0280b7f4341da5d1b1eae06c7d',
|
|
579
|
+
'0x9b2f2f6d9c5628a7844163d015be86344082aa88d95e2f9d'),
|
|
580
|
+
|
|
581
|
+
k224: new ecc.curve(
|
|
582
|
+
bn.prime.p224k,
|
|
583
|
+
'0x010000000000000000000000000001dce8d2ec6184caf0a971769fb1f7',
|
|
584
|
+
0,
|
|
585
|
+
5,
|
|
586
|
+
'0xa1455b334df099df30fc28a169a467e9e47075a90f7e650eb6b7a45c',
|
|
587
|
+
'0x7e089fed7fba344282cafbd6f7e319f7c0b0bd59e2ca4bdb556d61a5'),
|
|
588
|
+
|
|
589
|
+
k256: new ecc.curve(
|
|
590
|
+
bn.prime.p256k,
|
|
591
|
+
'0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141',
|
|
592
|
+
0,
|
|
593
|
+
7,
|
|
594
|
+
'0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798',
|
|
595
|
+
'0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8')
|
|
596
|
+
};
|
|
597
|
+
|
|
598
|
+
ecc.curveName = function (curve) {
|
|
599
|
+
for (const name in ecc.curves) {
|
|
600
|
+
if (Object.prototype.hasOwnProperty.call(ecc.curves, name) && ecc.curves[name] === curve) {
|
|
601
|
+
return name;
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
console.warn('[crypto] INVALID: ecc: no such curve');
|
|
605
|
+
return false;
|
|
606
|
+
};
|
|
607
|
+
|
|
608
|
+
// FIPS 186-5 §A.4.2 / SP 800-56A Rev.3 §5.6.2.3.3 - full public-key
|
|
609
|
+
// validation:
|
|
610
|
+
// (1) x, y ∈ [0, p) (coordinates within the field range - must be
|
|
611
|
+
// checked against the *raw* encoded value, not the SJCL field
|
|
612
|
+
// representation which may carry a denormalized integer >= p
|
|
613
|
+
// satisfying the curve equation modulo p).
|
|
614
|
+
// (2) point is on the curve (`y² = b + x(a + x²)` mod p).
|
|
615
|
+
// (3) point is not the identity.
|
|
616
|
+
// (4) point lies in the prime-order subgroup `<G>` (i.e. `n·Q == O`).
|
|
617
|
+
// For NIST P-curves the cofactor is 1, so (4) is implied by (2)+(3),
|
|
618
|
+
// but we still check explicitly to defend against twist attacks and
|
|
619
|
+
// cofactor>1 curves (Koblitz K-*).
|
|
620
|
+
function _coordsInRange(bits, curve) {
|
|
621
|
+
const halfBits = curve.field.prototype.exponent + 7 & -8;
|
|
622
|
+
const xBn = bn.fromBits(bitArray.bitSlice(bits, 0, halfBits));
|
|
623
|
+
const yBn = bn.fromBits(bitArray.bitSlice(bits, halfBits, 2 * halfBits));
|
|
624
|
+
const p = curve.field.modulus;
|
|
625
|
+
return !xBn.greaterEquals(p) && !yBn.greaterEquals(p);
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
function _isInSubgroup(point, curve) {
|
|
629
|
+
if (!point || point === false) return false;
|
|
630
|
+
if (point.isIdentity) return false; // O is not a valid pk
|
|
631
|
+
if (!point.isValid()) return false; // not on the curve
|
|
632
|
+
const result = point.mult(curve.r);
|
|
633
|
+
return !!result && result.isIdentity; // n·Q must be the identity
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
ecc.deserialize = function (key) {
|
|
637
|
+
const types = ['elGamal', 'ecdsa'];
|
|
638
|
+
|
|
639
|
+
if (!key || !key.curve || !ecc.curves[key.curve]) {
|
|
640
|
+
console.warn('[crypto] INVALID: ecc: invalid serialization');
|
|
641
|
+
return false;
|
|
642
|
+
}
|
|
643
|
+
if (types.indexOf(key.type) === -1) {
|
|
644
|
+
console.warn('[crypto] INVALID: ecc: invalid type');
|
|
645
|
+
return false;
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
const curve = ecc.curves[key.curve];
|
|
649
|
+
|
|
650
|
+
if (key.secretKey) {
|
|
651
|
+
if (!key.exponent) {
|
|
652
|
+
console.warn('[crypto] INVALID: ecc: invalid exponent');
|
|
653
|
+
return false;
|
|
654
|
+
}
|
|
655
|
+
const exponent = new bn.bn(key.exponent);
|
|
656
|
+
return new ecc[key.type].secretKey(curve, exponent);
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
if (!key.point) {
|
|
660
|
+
console.warn('[crypto] INVALID: ecc: invalid point');
|
|
661
|
+
return false;
|
|
662
|
+
}
|
|
663
|
+
const ptBits = bitArray.ui8_to_ba(hex.toBytes(key.point));
|
|
664
|
+
if (!_coordsInRange(ptBits, curve)) {
|
|
665
|
+
console.warn('[crypto] INVALID: ecc: x or y coordinate out of field range');
|
|
666
|
+
return false;
|
|
667
|
+
}
|
|
668
|
+
const point = curve.fromBits(ptBits);
|
|
669
|
+
if (point === false) {
|
|
670
|
+
// fromBits already logged a CORRUPT message
|
|
671
|
+
return false;
|
|
672
|
+
}
|
|
673
|
+
if (!_isInSubgroup(point, curve)) {
|
|
674
|
+
console.warn('[crypto] INVALID: ecc: public key not in the main subgroup (n·Q != O)');
|
|
675
|
+
return false;
|
|
676
|
+
}
|
|
677
|
+
return new ecc[key.type].publicKey(curve, point);
|
|
678
|
+
};
|
|
679
|
+
|
|
680
|
+
ecc.basicKey = {
|
|
681
|
+
publicKey: function (curve, point) {
|
|
682
|
+
this._curve = curve;
|
|
683
|
+
this._curveBitLength = curve.r.bitLength();
|
|
684
|
+
if (point instanceof Array) {
|
|
685
|
+
this._point = curve.fromBits(point);
|
|
686
|
+
} else {
|
|
687
|
+
this._point = point;
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
this.serialize = function () {
|
|
691
|
+
const curveName = ecc.curveName(curve);
|
|
692
|
+
return {
|
|
693
|
+
type: this.getType(),
|
|
694
|
+
secretKey: false,
|
|
695
|
+
point: hex.fromBytes(bitArray.ba_to_ui8(this._point.toBits())),
|
|
696
|
+
curve: curveName
|
|
697
|
+
};
|
|
698
|
+
};
|
|
699
|
+
|
|
700
|
+
this.get = function () {
|
|
701
|
+
const pointbits = this._point.toBits();
|
|
702
|
+
const len = bitArray.bitLength(pointbits);
|
|
703
|
+
const x = bitArray.bitSlice(pointbits, 0, len / 2);
|
|
704
|
+
const y = bitArray.bitSlice(pointbits, len / 2);
|
|
705
|
+
return { x, y };
|
|
706
|
+
};
|
|
707
|
+
},
|
|
708
|
+
|
|
709
|
+
secretKey: function (curve, exponent) {
|
|
710
|
+
this._curve = curve;
|
|
711
|
+
this._curveBitLength = curve.r.bitLength();
|
|
712
|
+
this._exponent = exponent;
|
|
713
|
+
|
|
714
|
+
this.serialize = function () {
|
|
715
|
+
const exp = this.get();
|
|
716
|
+
const curveName = ecc.curveName(curve);
|
|
717
|
+
return {
|
|
718
|
+
type: this.getType(),
|
|
719
|
+
secretKey: true,
|
|
720
|
+
exponent: hex.fromBytes(bitArray.ba_to_ui8(exp)),
|
|
721
|
+
curve: curveName
|
|
722
|
+
};
|
|
723
|
+
};
|
|
724
|
+
|
|
725
|
+
this.get = function () {
|
|
726
|
+
return this._exponent.toBits();
|
|
727
|
+
};
|
|
728
|
+
}
|
|
729
|
+
};
|
|
730
|
+
|
|
731
|
+
ecc.basicKey.generateKeys = function (cn) {
|
|
732
|
+
return function generateKeys(curve, paranoia, sec) {
|
|
733
|
+
curve = curve || 256;
|
|
734
|
+
|
|
735
|
+
if (typeof curve === 'number') {
|
|
736
|
+
curve = ecc.curves['c' + curve];
|
|
737
|
+
if (curve === undefined) {
|
|
738
|
+
console.warn('[crypto] INVALID: ecc: no such curve');
|
|
739
|
+
return false;
|
|
740
|
+
}
|
|
741
|
+
}
|
|
742
|
+
sec = sec || bn.random(curve.r, paranoia);
|
|
743
|
+
|
|
744
|
+
const pub = curve.G.mult(sec);
|
|
745
|
+
return {
|
|
746
|
+
pub: new ecc[cn].publicKey(curve, pub),
|
|
747
|
+
sec: new ecc[cn].secretKey(curve, sec)
|
|
748
|
+
};
|
|
749
|
+
};
|
|
750
|
+
};
|
|
751
|
+
|
|
752
|
+
ecc.elGamal = {
|
|
753
|
+
generateKeys: ecc.basicKey.generateKeys('elGamal'),
|
|
754
|
+
publicKey: function (curve, point) {
|
|
755
|
+
ecc.basicKey.publicKey.apply(this, arguments);
|
|
756
|
+
},
|
|
757
|
+
secretKey: function (curve, exponent) {
|
|
758
|
+
ecc.basicKey.secretKey.apply(this, arguments);
|
|
759
|
+
}
|
|
760
|
+
};
|
|
761
|
+
|
|
762
|
+
ecc.elGamal.publicKey.prototype = {
|
|
763
|
+
kem(paranoia, bits = 256) {
|
|
764
|
+
const sec = bn.random(this._curve.r, paranoia);
|
|
765
|
+
const tag = this._curve.G.mult(sec).toBits();
|
|
766
|
+
const h = hashes[bits] || sha256;
|
|
767
|
+
const key = h.hash(this._point.mult(sec).toBits());
|
|
768
|
+
return { key, tag };
|
|
769
|
+
},
|
|
770
|
+
|
|
771
|
+
getType() { return 'elGamal'; }
|
|
772
|
+
};
|
|
773
|
+
|
|
774
|
+
ecc.elGamal.secretKey.prototype = {
|
|
775
|
+
unkem(tag, bits = 256) {
|
|
776
|
+
const h = hashes[bits] || sha256;
|
|
777
|
+
return h.hash(this._curve.fromBits(tag).mult(this._exponent).toBits());
|
|
778
|
+
},
|
|
779
|
+
|
|
780
|
+
dh(pk, bits = 256) {
|
|
781
|
+
const h = hashes[bits] || sha256;
|
|
782
|
+
return h.hash(pk._point.mult(this._exponent).toBits());
|
|
783
|
+
},
|
|
784
|
+
|
|
785
|
+
dhJavaEc(pk) {
|
|
786
|
+
return pk._point.mult(this._exponent).x.toBits();
|
|
787
|
+
},
|
|
788
|
+
|
|
789
|
+
getType() { return 'elGamal'; }
|
|
790
|
+
};
|
|
791
|
+
|
|
792
|
+
ecc.ecdsa = {
|
|
793
|
+
generateKeys: ecc.basicKey.generateKeys('ecdsa')
|
|
794
|
+
};
|
|
795
|
+
|
|
796
|
+
ecc.ecdsa.publicKey = function (curve, point) {
|
|
797
|
+
ecc.basicKey.publicKey.apply(this, arguments);
|
|
798
|
+
};
|
|
799
|
+
|
|
800
|
+
ecc.ecdsa.publicKey.prototype = {
|
|
801
|
+
// Verify ECDSA signature `rs` (r||s) over `hash`.
|
|
802
|
+
//
|
|
803
|
+
// Third argument can be either:
|
|
804
|
+
// - boolean `fakeLegacyVersion` (back-compat), OR
|
|
805
|
+
// - object `opts = { fakeLegacyVersion?, strict? }`.
|
|
806
|
+
//
|
|
807
|
+
// Iteration C3 of the FIPS 140-3 upgrade plan - `opts.strict = true`
|
|
808
|
+
// enables ECDSA "low-s" rejection (BIP62 / NIST strict mode):
|
|
809
|
+
// a canonical signature has `s ∈ [1, ⌊n/2⌋]`. Any value of s
|
|
810
|
+
// in (n/2, n) - including the malleable signature `s' = n - s` -
|
|
811
|
+
// is rejected. Allows matching 4 ACVP `SigVer-FIPS186-5`
|
|
812
|
+
// negative vectors marked `s out of range` or `s near n` that were
|
|
813
|
+
// incorrectly passing in legacy mode.
|
|
814
|
+
verify(hash, rs, optsOrLegacy) {
|
|
815
|
+
let opts = null;
|
|
816
|
+
let fakeLegacyVersion;
|
|
817
|
+
if (optsOrLegacy && typeof optsOrLegacy === 'object') {
|
|
818
|
+
opts = optsOrLegacy;
|
|
819
|
+
fakeLegacyVersion = !!opts.fakeLegacyVersion;
|
|
820
|
+
} else {
|
|
821
|
+
fakeLegacyVersion = !!optsOrLegacy;
|
|
822
|
+
}
|
|
823
|
+
const strict = !!(opts && opts.strict);
|
|
824
|
+
|
|
825
|
+
if (bitArray.bitLength(hash) > this._curveBitLength) {
|
|
826
|
+
hash = bitArray.clamp(hash, this._curveBitLength);
|
|
827
|
+
}
|
|
828
|
+
const R = this._curve.r;
|
|
829
|
+
const l = this._curveBitLength;
|
|
830
|
+
const r = bn.fromBits(bitArray.bitSlice(rs, 0, l));
|
|
831
|
+
const ss = bn.fromBits(bitArray.bitSlice(rs, l, 2 * l));
|
|
832
|
+
const s = fakeLegacyVersion ? ss : ss.inverseMod(R);
|
|
833
|
+
const hG = bn.fromBits(hash).mul(s).mod(R);
|
|
834
|
+
const hA = r.mul(s).mod(R);
|
|
835
|
+
const r2 = this._curve.G.mult2(hG, hA, this._point).x;
|
|
836
|
+
if (r.equals(0) || ss.equals(0) || r.greaterEquals(R) || ss.greaterEquals(R) || !r2.equals(r)) {
|
|
837
|
+
console.error('[crypto] CORRUPT: ecdsa: signature did not verify');
|
|
838
|
+
return false;
|
|
839
|
+
}
|
|
840
|
+
if (strict) {
|
|
841
|
+
// halfR = floor(n / 2). For an odd curve order n, halfR = (n-1)/2,
|
|
842
|
+
// so canonical s satisfies s <= halfR ⟺ reject when s > halfR
|
|
843
|
+
// ⟺ reject when s.greaterEquals(halfR + 1).
|
|
844
|
+
const halfR = R.copy().halveM();
|
|
845
|
+
const upperBoundExcl = halfR.add(new bn.bn(1));
|
|
846
|
+
if (ss.greaterEquals(upperBoundExcl)) {
|
|
847
|
+
console.error('[crypto] CORRUPT: ecdsa: signature is malleable (s > n/2) under strict mode');
|
|
848
|
+
return false;
|
|
849
|
+
}
|
|
850
|
+
}
|
|
851
|
+
return true;
|
|
852
|
+
},
|
|
853
|
+
|
|
854
|
+
getType() { return 'ecdsa'; }
|
|
855
|
+
};
|
|
856
|
+
|
|
857
|
+
ecc.ecdsa.secretKey = function (curve, exponent) {
|
|
858
|
+
ecc.basicKey.secretKey.apply(this, arguments);
|
|
859
|
+
};
|
|
860
|
+
|
|
861
|
+
ecc.ecdsa.secretKey.prototype = {
|
|
862
|
+
// Sign `hash` (already-digested message bits) with this private key.
|
|
863
|
+
//
|
|
864
|
+
// Iteration C3 of the FIPS 140-3 upgrade plan:
|
|
865
|
+
// - `opts.hashForK` : explicit hash module for RFC 6979 §3.2 K
|
|
866
|
+
// derivation (default: `_hashForBits(curveBitLength)`,
|
|
867
|
+
// which ties H_K to the curve size instead of H_msg -
|
|
868
|
+
// sufficient for ACVP DetECDSA conformance but limits
|
|
869
|
+
// byte-exact replay to (curve, hash) pairs where H_K = H_msg).
|
|
870
|
+
// Strict RFC 6979 requires H_K = H_msg. This option lets
|
|
871
|
+
// the caller fix H_K explicitly (e.g. SHA-256 on P-384,
|
|
872
|
+
// or a cheaper hash for batch operations).
|
|
873
|
+
// - `opts.strict` : makes `s` canonical low-s (`s <= n/2`) instead
|
|
874
|
+
// of the natural inverseMod - useful when a protocol rejects
|
|
875
|
+
// malleable signatures on the verify side.
|
|
876
|
+
sign(hash, paranoia, fakeLegacyVersion, fixedKForTesting) {
|
|
877
|
+
let opts = null;
|
|
878
|
+
if (paranoia && typeof paranoia === 'object') {
|
|
879
|
+
opts = paranoia;
|
|
880
|
+
paranoia = opts.paranoia;
|
|
881
|
+
fakeLegacyVersion = opts.fakeLegacyVersion;
|
|
882
|
+
fixedKForTesting = opts.fixedKForTesting;
|
|
883
|
+
}
|
|
884
|
+
const deterministic = opts ? opts.deterministic !== false : true;
|
|
885
|
+
const hashForK = opts ? opts.hashForK : null;
|
|
886
|
+
const strict = !!(opts && opts.strict);
|
|
887
|
+
if (bitArray.bitLength(hash) > this._curveBitLength) {
|
|
888
|
+
hash = bitArray.clamp(hash, this._curveBitLength);
|
|
889
|
+
}
|
|
890
|
+
const R = this._curve.r;
|
|
891
|
+
const l = R.bitLength();
|
|
892
|
+
let k;
|
|
893
|
+
if (fixedKForTesting) {
|
|
894
|
+
k = fixedKForTesting;
|
|
895
|
+
} else if (deterministic) {
|
|
896
|
+
const Hash = hashForK || _hashForBits(this._curveBitLength);
|
|
897
|
+
k = _rfc6979K(hash, this._exponent, R, Hash);
|
|
898
|
+
} else {
|
|
899
|
+
k = bn.random(R.sub(1), paranoia).add(1);
|
|
900
|
+
}
|
|
901
|
+
const r = this._curve.G.mult(k).x.mod(R);
|
|
902
|
+
const ss = bn.fromBits(hash).add(r.mul(this._exponent));
|
|
903
|
+
let s = fakeLegacyVersion
|
|
904
|
+
? ss.inverseMod(R).mul(k).mod(R)
|
|
905
|
+
: ss.mul(k.inverseMod(R)).mod(R);
|
|
906
|
+
if (strict) {
|
|
907
|
+
// Canonicalise s to low-s : if s > n/2, replace with n - s.
|
|
908
|
+
const halfR = R.copy().halveM();
|
|
909
|
+
const upperBoundExcl = halfR.add(new bn.bn(1));
|
|
910
|
+
if (s.greaterEquals(upperBoundExcl)) {
|
|
911
|
+
s = R.sub(s).normalize();
|
|
912
|
+
}
|
|
913
|
+
}
|
|
914
|
+
return bitArray.concat(r.toBits(l), s.toBits(l));
|
|
915
|
+
},
|
|
916
|
+
|
|
917
|
+
getType() { return 'ecdsa'; }
|
|
918
|
+
};
|
|
919
|
+
|
|
920
|
+
// ── Internal escape hatch (test-only) ────────────────────────
|
|
921
|
+
// Iteration C1 of the FIPS 140-3 upgrade plan - exposes the subgroup
|
|
922
|
+
// membership test for direct testing against ACVP KeyVer-FIPS186-5
|
|
923
|
+
// negative vectors (where Q is on the curve but outside <G>).
|
|
924
|
+
ecc._internal = {
|
|
925
|
+
coordsInRange: _coordsInRange,
|
|
926
|
+
isInSubgroup: _isInSubgroup,
|
|
927
|
+
isValidPublicKey(curveName, pointHex) {
|
|
928
|
+
const curve = ecc.curves[curveName];
|
|
929
|
+
if (!curve) return false;
|
|
930
|
+
const bits = bitArray.ui8_to_ba(hex.toBytes(pointHex));
|
|
931
|
+
if (!_coordsInRange(bits, curve)) return false;
|
|
932
|
+
const point = curve.fromBits(bits);
|
|
933
|
+
if (point === false) return false;
|
|
934
|
+
return _isInSubgroup(point, curve);
|
|
935
|
+
}
|
|
936
|
+
};
|
|
937
|
+
|
|
938
|
+
// @ts-ignore -- basicKey.generateKeys is assigned dynamically after construction
|
|
939
|
+
return ecc;
|
|
940
|
+
}
|
|
941
|
+
};
|