@awacloud/fw 0.1.0 → 1.0.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 +125 -0
- package/NOTICE +8 -0
- package/README.md +163 -31
- package/dist/build/fw.core.pure.meta.json +6 -6
- package/dist/build/fw.core.pure.min.js +15 -12
- package/dist/build/fw.full.pure.meta.json +13 -7
- package/dist/build/fw.full.pure.min.js +45 -42
- package/dist/build/fw.minimal.pure.meta.json +6 -6
- package/dist/build/fw.minimal.pure.min.js +16 -13
- package/dist/build/fw.pack.compress-heavy.pure.meta.json +6 -6
- package/dist/build/fw.pack.compress-heavy.pure.min.js +3 -3
- package/dist/build/fw.pack.crypto-advanced.pure.meta.json +6 -6
- package/dist/build/fw.pack.crypto-advanced.pure.min.js +1 -1
- package/dist/build/fw.pack.crypto-basic.pure.meta.json +6 -6
- package/dist/build/fw.pack.crypto-basic.pure.min.js +1 -1
- package/dist/build/fw.pack.crypto-identity.pure.meta.json +7 -6
- package/dist/build/fw.pack.crypto-identity.pure.min.js +4 -4
- package/dist/build/fw.pwa.pure.meta.json +7 -6
- package/dist/build/fw.pwa.pure.min.js +38 -35
- package/dist/build/fw.site-interactive.pure.meta.json +6 -6
- package/dist/build/fw.site-interactive.pure.min.js +37 -34
- package/dist/build/fw.site.pure.meta.json +6 -6
- package/dist/build/fw.site.pure.min.js +24 -21
- package/dist/build/fw.spa.pure.meta.json +8 -7
- package/dist/build/fw.spa.pure.min.js +41 -38
- package/dist/build/sanity-base-classic.min.js +1 -1
- package/dist/build/sanity.min.js +1 -1
- package/dist/types/core/internal.d.ts +29 -0
- package/dist/types/core/internal.d.ts.map +1 -0
- package/dist/types/core/logger.d.ts +23 -4
- package/dist/types/core/logger.d.ts.map +1 -1
- package/dist/types/core/modules.d.ts +374 -61
- package/dist/types/core/modules.d.ts.map +1 -1
- package/dist/types/core/runtime.d.ts +10 -6
- package/dist/types/core/runtime.d.ts.map +1 -1
- package/dist/types/core/worker-helper.d.ts +35 -0
- package/dist/types/core/worker-helper.d.ts.map +1 -1
- package/dist/types/crypto/cipher/aes.d.ts +1 -7
- package/dist/types/crypto/cipher/aes.d.ts.map +1 -1
- package/dist/types/crypto/cipher/chacha20.d.ts +0 -10
- package/dist/types/crypto/cipher/chacha20.d.ts.map +1 -1
- package/dist/types/crypto/hash/argon2.d.ts +0 -15
- package/dist/types/crypto/hash/argon2.d.ts.map +1 -1
- package/dist/types/crypto/hash/blake2b.d.ts.map +1 -1
- package/dist/types/crypto/hash/hmac.d.ts.map +1 -1
- package/dist/types/crypto/hash/pbkdf2.d.ts.map +1 -1
- package/dist/types/crypto/hash/poly1305.d.ts.map +1 -1
- package/dist/types/crypto/hash/sha224.d.ts +1 -1
- package/dist/types/crypto/hash/sha256.d.ts +4 -13
- package/dist/types/crypto/hash/sha256.d.ts.map +1 -1
- package/dist/types/crypto/hash/sha3.d.ts.map +1 -1
- package/dist/types/crypto/hash/sha384.d.ts +1 -1
- package/dist/types/crypto/hash/sha512.d.ts +4 -13
- package/dist/types/crypto/hash/sha512.d.ts.map +1 -1
- package/dist/types/crypto/mode/cmac.d.ts +0 -6
- package/dist/types/crypto/mode/cmac.d.ts.map +1 -1
- package/dist/types/crypto/mode/ctr.d.ts +0 -6
- package/dist/types/crypto/mode/ctr.d.ts.map +1 -1
- package/dist/types/crypto/mode/gcm.d.ts +0 -9
- package/dist/types/crypto/mode/gcm.d.ts.map +1 -1
- package/dist/types/crypto/pkc/ecc.d.ts +0 -1
- package/dist/types/crypto/pkc/ecc.d.ts.map +1 -1
- package/dist/types/crypto/pkc/ed25519.d.ts +4 -25
- package/dist/types/crypto/pkc/ed25519.d.ts.map +1 -1
- package/dist/types/crypto/pkc/hybridSign.d.ts +25 -5
- package/dist/types/crypto/pkc/hybridSign.d.ts.map +1 -1
- package/dist/types/crypto/pkc/ml_dsa.d.ts +6 -26
- package/dist/types/crypto/pkc/ml_dsa.d.ts.map +1 -1
- package/dist/types/crypto/pkc/ml_kem.d.ts +0 -43
- package/dist/types/crypto/pkc/ml_kem.d.ts.map +1 -1
- package/dist/types/crypto/pkc/rsa.d.ts +0 -24
- package/dist/types/crypto/pkc/rsa.d.ts.map +1 -1
- package/dist/types/crypto/pkc/slh_dsa.d.ts +6 -16
- package/dist/types/crypto/pkc/slh_dsa.d.ts.map +1 -1
- package/dist/types/crypto/pkc/x25519.d.ts +0 -6
- package/dist/types/crypto/pkc/x25519.d.ts.map +1 -1
- package/dist/types/crypto/utils/bitArray.d.ts +0 -8
- package/dist/types/crypto/utils/bitArray.d.ts.map +1 -1
- package/dist/types/crypto/utils/jws.d.ts +6 -14
- package/dist/types/crypto/utils/jws.d.ts.map +1 -1
- package/dist/types/crypto/utils/keyformat.d.ts +52 -0
- package/dist/types/crypto/utils/keyformat.d.ts.map +1 -1
- package/dist/types/crypto/utils/random.d.ts +1 -10
- package/dist/types/crypto/utils/random.d.ts.map +1 -1
- package/dist/types/crypto/utils/rsaKeygen.d.ts +0 -10
- package/dist/types/crypto/utils/rsaKeygen.d.ts.map +1 -1
- package/dist/types/crypto/utils/uuid.d.ts.map +1 -1
- package/dist/types/crypto/utils/x509.d.ts +397 -0
- package/dist/types/crypto/utils/x509.d.ts.map +1 -0
- package/dist/types/crypto/wasm/argon2.d.ts +2 -1
- package/dist/types/crypto/wasm/argon2.d.ts.map +1 -1
- package/dist/types/crypto/wasm/pbkdf2.d.ts +2 -2
- package/dist/types/crypto/wasm/pbkdf2.d.ts.map +1 -1
- package/dist/types/crypto/wasm/rsa.d.ts.map +1 -1
- package/dist/types/crypto/wasm/runtime.d.ts +13 -0
- package/dist/types/crypto/wasm/runtime.d.ts.map +1 -1
- package/dist/types/crypto/webcrypto/aes.d.ts.map +1 -1
- package/dist/types/crypto/webcrypto/aeskw.d.ts.map +1 -1
- package/dist/types/crypto/webcrypto/digest.d.ts +0 -4
- package/dist/types/crypto/webcrypto/digest.d.ts.map +1 -1
- package/dist/types/crypto/webcrypto/rsa.d.ts.map +1 -1
- package/dist/types/dom/fs/fileIntake.d.ts +59 -0
- package/dist/types/dom/fs/fileIntake.d.ts.map +1 -0
- package/dist/types/dom/fs/fsAccess.d.ts.map +1 -1
- package/dist/types/dom/query/dnd.d.ts.map +1 -1
- package/dist/types/dom/query/sound.d.ts +89 -0
- package/dist/types/dom/query/sound.d.ts.map +1 -0
- package/dist/types/dom/rendering/chart.d.ts.map +1 -1
- package/dist/types/dom/rendering/component.d.ts +9 -3
- package/dist/types/dom/rendering/component.d.ts.map +1 -1
- package/dist/types/dom/rendering/parser.d.ts +39 -0
- package/dist/types/dom/rendering/parser.d.ts.map +1 -1
- package/dist/types/dom/rendering/render.d.ts.map +1 -1
- package/dist/types/dom/rendering/sanitize.d.ts +4 -0
- package/dist/types/dom/rendering/sanitize.d.ts.map +1 -1
- package/dist/types/dom/rendering/secPolicy.d.ts.map +1 -1
- package/dist/types/dom/rendering/styleSheet.d.ts +74 -0
- package/dist/types/dom/rendering/styleSheet.d.ts.map +1 -0
- package/dist/types/dom/rendering/template.d.ts +9 -3
- package/dist/types/dom/rendering/template.d.ts.map +1 -1
- package/dist/types/dom/rendering/themeTokens.d.ts +9 -3
- package/dist/types/dom/rendering/themeTokens.d.ts.map +1 -1
- package/dist/types/dom/rendering/uiSession-core.d.ts +9 -3
- package/dist/types/dom/rendering/uiSession-core.d.ts.map +1 -1
- package/dist/types/dom/rendering/uiSession-list.d.ts +9 -3
- package/dist/types/dom/rendering/uiSession-list.d.ts.map +1 -1
- package/dist/types/dom/rendering/uiSession.d.ts +18 -6
- package/dist/types/dom/rendering/uiSession.d.ts.map +1 -1
- package/dist/types/dom/sw/installPrompt.d.ts +89 -0
- package/dist/types/dom/sw/installPrompt.d.ts.map +1 -0
- package/dist/types/dom/sw/precache.d.ts +149 -0
- package/dist/types/dom/sw/precache.d.ts.map +1 -0
- package/dist/types/dom/sw/swUpdate.d.ts +129 -0
- package/dist/types/dom/sw/swUpdate.d.ts.map +1 -0
- package/dist/types/dom/utils/clipboard.d.ts +8 -0
- package/dist/types/dom/utils/clipboard.d.ts.map +1 -1
- package/dist/types/dom/utils/keybindings.d.ts.map +1 -1
- package/dist/types/dom/utils/route.d.ts.map +1 -1
- package/dist/types/dom/utils/ua.d.ts +2 -2
- package/dist/types/dom/utils/ua.d.ts.map +1 -1
- package/dist/types/io/calc/crc32.d.ts.map +1 -1
- package/dist/types/io/codec/b64.d.ts +24 -0
- package/dist/types/io/codec/b64.d.ts.map +1 -1
- package/dist/types/io/codec/cbor.d.ts +1 -0
- package/dist/types/io/codec/cbor.d.ts.map +1 -1
- package/dist/types/io/codec/hex.d.ts.map +1 -1
- package/dist/types/io/codec/msgpack.d.ts +1 -0
- package/dist/types/io/codec/msgpack.d.ts.map +1 -1
- package/dist/types/io/codec/url.d.ts +3 -1
- package/dist/types/io/codec/url.d.ts.map +1 -1
- package/dist/types/io/codec/utf8.d.ts.map +1 -1
- package/dist/types/io/compress/bitstream.d.ts +1 -1
- package/dist/types/io/compress/brotli.d.ts +0 -1
- package/dist/types/io/compress/brotli.d.ts.map +1 -1
- package/dist/types/io/compress/brotli_shared.d.ts +0 -4
- package/dist/types/io/compress/brotli_shared.d.ts.map +1 -1
- package/dist/types/io/compress/deflate.d.ts +14 -1
- package/dist/types/io/compress/deflate.d.ts.map +1 -1
- package/dist/types/io/compress/gzip.d.ts +4 -0
- package/dist/types/io/compress/gzip.d.ts.map +1 -1
- package/dist/types/io/compress/huffman.d.ts +7 -0
- package/dist/types/io/compress/huffman.d.ts.map +1 -1
- package/dist/types/io/compress/lz4.d.ts +4 -2
- package/dist/types/io/compress/lz4.d.ts.map +1 -1
- package/dist/types/io/compress/lz77.d.ts +17 -0
- package/dist/types/io/compress/lz77.d.ts.map +1 -1
- package/dist/types/io/compress/lzw.d.ts +2 -0
- package/dist/types/io/compress/lzw.d.ts.map +1 -1
- package/dist/types/io/compress/zip.d.ts.map +1 -1
- package/dist/types/io/compress/zlib.d.ts +9 -2
- package/dist/types/io/compress/zlib.d.ts.map +1 -1
- package/dist/types/io/math/linalg.d.ts.map +1 -1
- package/dist/types/process/rpc.d.ts.map +1 -1
- package/dist/types/process/workerPool.d.ts.map +1 -1
- package/dist/types/sanity/base.d.ts +12 -2
- package/dist/types/sanity/base.d.ts.map +1 -1
- package/dist/types/sanity/lockdown.d.ts +6 -5
- package/dist/types/sanity/lockdown.d.ts.map +1 -1
- package/dist/types/sanity/wasm-gate.d.ts +1 -1
- package/docs/README.md +17 -10
- package/docs/api/README.md +5 -5
- package/docs/api/core/logger.md +2 -1
- package/docs/api/core/modules.md +3 -3
- package/docs/api/core/runtime.md +9 -9
- package/docs/api/core/worker-helper.md +12 -2
- package/docs/api/crypto/README.md +1 -1
- package/docs/api/crypto/cipher/README.md +2 -2
- package/docs/api/crypto/cipher/aes.md +5 -10
- package/docs/api/crypto/cipher/chacha20.md +3 -8
- package/docs/api/crypto/hash/README.md +5 -5
- package/docs/api/crypto/hash/adf.md +21 -11
- package/docs/api/crypto/hash/argon2.md +3 -12
- package/docs/api/crypto/hash/blake2b.md +12 -14
- package/docs/api/crypto/hash/pbkdf2.md +1 -1
- package/docs/api/crypto/hash/sha224.md +2 -2
- package/docs/api/crypto/hash/sha256.md +4 -4
- package/docs/api/crypto/hash/sha3.md +2 -2
- package/docs/api/crypto/hash/sha384.md +1 -1
- package/docs/api/crypto/hash/sha512.md +5 -5
- package/docs/api/crypto/hash/sha512_224.md +1 -1
- package/docs/api/crypto/hash/sha512_256.md +1 -1
- package/docs/api/crypto/mode/README.md +3 -3
- package/docs/api/crypto/mode/cbc.md +2 -2
- package/docs/api/crypto/mode/chacha20poly1305.md +1 -1
- package/docs/api/crypto/mode/cmac.md +4 -4
- package/docs/api/crypto/mode/ctr.md +2 -3
- package/docs/api/crypto/mode/gcm.md +5 -5
- package/docs/api/crypto/mode/kw.md +4 -4
- package/docs/api/crypto/pkc/README.md +8 -8
- package/docs/api/crypto/pkc/ecc.md +19 -17
- package/docs/api/crypto/pkc/ed25519.md +10 -15
- package/docs/api/crypto/pkc/hybridKem.md +8 -2
- package/docs/api/crypto/pkc/hybridSign.md +34 -7
- package/docs/api/crypto/pkc/ml_dsa.md +20 -19
- package/docs/api/crypto/pkc/ml_kem.md +3 -3
- package/docs/api/crypto/pkc/rsa.md +7 -9
- package/docs/api/crypto/pkc/slh_dsa.md +12 -12
- package/docs/api/crypto/pkc/x25519.md +5 -4
- package/docs/api/crypto/utils/README.md +7 -7
- package/docs/api/crypto/utils/aes_modes.md +2 -5
- package/docs/api/crypto/utils/asn1.md +25 -16
- package/docs/api/crypto/utils/jws.md +6 -4
- package/docs/api/crypto/utils/keyformat.md +24 -15
- package/docs/api/crypto/utils/pad.md +1 -1
- package/docs/api/crypto/utils/pem.md +3 -3
- package/docs/api/crypto/utils/random.md +3 -4
- package/docs/api/crypto/utils/rsaKeygen.md +2 -2
- package/docs/api/crypto/utils/totp.md +2 -2
- package/docs/api/crypto/utils/uuid.md +5 -5
- package/docs/api/crypto/utils/x509.md +124 -0
- package/docs/api/crypto/wasm/aes.md +1 -1
- package/docs/api/crypto/wasm/argon2.md +6 -4
- package/docs/api/crypto/wasm/ml_kem.md +1 -0
- package/docs/api/crypto/wasm/pbkdf2.md +8 -8
- package/docs/api/crypto/wasm/rsa.md +1 -1
- package/docs/api/crypto/wasm/runtime.md +27 -10
- package/docs/api/crypto/webcrypto/aes.md +1 -1
- package/docs/api/crypto/webcrypto/aeskw.md +2 -2
- package/docs/api/crypto/webcrypto/digest.md +3 -5
- package/docs/api/crypto/webcrypto/ecc.md +1 -1
- package/docs/api/crypto/webcrypto/ed25519.md +1 -1
- package/docs/api/crypto/webcrypto/rsa.md +3 -2
- package/docs/api/crypto/webcrypto/x25519.md +1 -1
- package/docs/api/dom/README.md +6 -1
- package/docs/api/dom/fs/README.md +1 -0
- package/docs/api/dom/fs/fileIntake.md +120 -0
- package/docs/api/dom/fs/fsAccess.md +1 -0
- package/docs/api/dom/fs/indexedDB.md +1 -1
- package/docs/api/dom/fs/storage.md +1 -1
- package/docs/api/dom/query/README.md +2 -1
- package/docs/api/dom/query/dnd.md +4 -1
- package/docs/api/dom/query/dom.md +5 -0
- package/docs/api/dom/query/sound.md +103 -0
- package/docs/api/dom/rendering/README.md +4 -3
- package/docs/api/dom/rendering/chart.md +5 -4
- package/docs/api/dom/rendering/component.md +25 -3
- package/docs/api/dom/rendering/parser.md +5 -2
- package/docs/api/dom/rendering/reactiveBind.md +1 -1
- package/docs/api/dom/rendering/render.md +2 -2
- package/docs/api/dom/rendering/sanitize.md +10 -2
- package/docs/api/dom/rendering/secPolicy.md +4 -4
- package/docs/api/dom/rendering/styleSheet.md +85 -0
- package/docs/api/dom/rendering/template.md +20 -5
- package/docs/api/dom/rendering/themeTokens.md +6 -3
- package/docs/api/dom/rendering/uiSession.md +18 -5
- package/docs/api/dom/rendering/virtualScroll.md +2 -2
- package/docs/api/dom/sensors/geolocation.md +1 -1
- package/docs/api/dom/sw/README.md +7 -1
- package/docs/api/dom/sw/cache.md +2 -1
- package/docs/api/dom/sw/installPrompt.md +111 -0
- package/docs/api/dom/sw/precache.md +124 -0
- package/docs/api/dom/sw/serviceWorker.md +4 -2
- package/docs/api/dom/sw/swUpdate.md +112 -0
- package/docs/api/dom/utils/clipboard.md +56 -5
- package/docs/api/dom/utils/entropyCollector.md +1 -1
- package/docs/api/dom/utils/keybindings.md +17 -2
- package/docs/api/dom/utils/leaderElection.md +2 -2
- package/docs/api/dom/utils/route.md +1 -0
- package/docs/api/dom/utils/ua.md +15 -10
- package/docs/api/io/calc/crc32.md +4 -1
- package/docs/api/io/codec/README.md +2 -2
- package/docs/api/io/codec/b64.md +31 -2
- package/docs/api/io/codec/buffer.md +1 -1
- package/docs/api/io/codec/cbor.md +6 -4
- package/docs/api/io/codec/csv.md +178 -178
- package/docs/api/io/codec/hex.md +10 -2
- package/docs/api/io/codec/msgpack.md +4 -3
- package/docs/api/io/codec/url.md +4 -3
- package/docs/api/io/codec/utf8.md +3 -3
- package/docs/api/io/compress/bitstream.md +6 -3
- package/docs/api/io/compress/brotli.md +36 -4
- package/docs/api/io/compress/brotli_shared.md +1 -1
- package/docs/api/io/compress/deflate.md +42 -34
- package/docs/api/io/compress/gzip.md +26 -6
- package/docs/api/io/compress/huffman.md +2 -1
- package/docs/api/io/compress/lz4.md +5 -3
- package/docs/api/io/compress/lz77.md +26 -3
- package/docs/api/io/compress/lzw.md +13 -8
- package/docs/api/io/compress/zip.md +36 -10
- package/docs/api/io/compress/zlib.md +21 -5
- package/docs/api/io/math/linalg.md +1 -1
- package/docs/api/io/utils/valid.md +1 -1
- package/docs/api/process/rpc.md +3 -2
- package/docs/api/process/workerPool.md +1 -1
- package/docs/api/sanity/base.md +9 -5
- package/docs/api/sanity/lockdown.md +7 -6
- package/docs/api/surface.json +12311 -0
- package/docs/api/typed.md +5 -3
- package/docs/dev/README.md +2 -0
- package/docs/dev/bench.md +76 -0
- package/docs/dev/crypto-references.md +54 -0
- package/docs/dev/provenance.md +30 -7
- package/docs/dev/publishing.md +7 -7
- package/docs/dev/runtime.md +1 -1
- package/docs/dev/testing.md +13 -0
- package/docs/evidence/l4-evidence.md +86 -0
- package/docs/evidence/pqc-hybrid-evidence.md +7 -6
- package/docs/guide/README.md +1 -0
- package/docs/guide/_QUICK_REF.md +5 -5
- package/docs/guide/doc-format.md +4 -3
- package/docs/guide/integrations-hmr.md +1 -1
- package/docs/guide/module-creation-workflow.md +8 -8
- package/docs/guide/rendering-pipeline.md +11 -4
- package/docs/guide/security.md +7 -5
- package/docs/guide/stability.md +123 -0
- package/docs/guide/tutorial-todo.md +20 -8
- package/docs/guide/typescript.md +9 -0
- package/docs/guide/worker-confinement.md +30 -17
- package/docs/notes/lz77-deflate-factorization.md +3 -3
- package/docs/tools/README.md +1 -1
- package/docs/tools/bundler.md +3 -3
- package/docs/tools/codegen.md +1 -1
- package/docs/tools/standalone.md +0 -1
- package/fw.config.json +2 -2
- package/integrations/_shared/catalog.generated.json +7 -1
- package/integrations/_shared/core.js +1 -1
- package/integrations/astro/index.js +1 -1
- package/integrations/eslint/README.md +7 -1
- package/integrations/nextjs/index.js +1 -1
- package/integrations/nodejs/README.md +3 -3
- package/integrations/turbopack/index.js +2 -2
- package/integrations/typedoc/categorize.js +1 -1
- package/integrations/typedoc/typedoc.json +2 -1
- package/integrations/vite/index.js +2 -2
- package/integrations/vite/vite-env.d.ts +7 -4
- package/integrations/webpack/index.js +3 -3
- package/package.json +76 -10
- package/src/core/internal.js +31 -0
- package/src/core/logger.js +95 -23
- package/src/core/modules.js +17 -8
- package/src/core/readyState.js +1 -1
- package/src/core/runtime.js +74 -27
- package/src/core/worker-helper.js +83 -4
- package/src/crypto/NIST_CONFORMANCE.md +47 -34
- package/src/crypto/cipher/aes.acvp.md +7 -8
- package/src/crypto/cipher/aes.js +280 -229
- package/src/crypto/cipher/chacha20.acvp.md +6 -7
- package/src/crypto/cipher/chacha20.js +91 -61
- package/src/crypto/hash/adf.js +1 -1
- package/src/crypto/hash/argon2.acvp.md +11 -15
- package/src/crypto/hash/argon2.js +9 -24
- package/src/crypto/hash/blake2b.js +157 -125
- package/src/crypto/hash/hkdf.acvp.md +15 -15
- package/src/crypto/hash/hkdf.js +1 -1
- package/src/crypto/hash/hmac.acvp.md +10 -12
- package/src/crypto/hash/hmac.js +5 -1
- package/src/crypto/hash/pbkdf2.acvp.md +13 -13
- package/src/crypto/hash/pbkdf2.js +36 -8
- package/src/crypto/hash/poly1305.acvp.md +10 -6
- package/src/crypto/hash/poly1305.js +171 -50
- package/src/crypto/hash/sha224.acvp.md +3 -3
- package/src/crypto/hash/sha224.js +4 -4
- package/src/crypto/hash/sha256.acvp.md +2 -2
- package/src/crypto/hash/sha256.js +514 -50
- package/src/crypto/hash/sha3.acvp.md +9 -9
- package/src/crypto/hash/sha3.js +127 -71
- package/src/crypto/hash/sha384.acvp.md +3 -3
- package/src/crypto/hash/sha384.js +4 -4
- package/src/crypto/hash/sha512.acvp.md +7 -8
- package/src/crypto/hash/sha512.js +107 -108
- package/src/crypto/hash/sha512_224.acvp.md +6 -6
- package/src/crypto/hash/sha512_224.js +2 -2
- package/src/crypto/hash/sha512_256.acvp.md +6 -6
- package/src/crypto/hash/sha512_256.js +2 -2
- package/src/crypto/mode/cbc.acvp.md +2 -2
- package/src/crypto/mode/cbc.js +1 -1
- package/src/crypto/mode/chacha20poly1305.acvp.md +6 -6
- package/src/crypto/mode/chacha20poly1305.js +3 -3
- package/src/crypto/mode/cmac.acvp.md +5 -5
- package/src/crypto/mode/cmac.js +8 -8
- package/src/crypto/mode/ctr.acvp.md +2 -2
- package/src/crypto/mode/ctr.js +1 -3
- package/src/crypto/mode/gcm.acvp.md +6 -6
- package/src/crypto/mode/gcm.js +7 -7
- package/src/crypto/mode/kw.acvp.md +4 -4
- package/src/crypto/mode/kw.js +5 -5
- package/src/crypto/pkc/ecc.acvp.md +13 -13
- package/src/crypto/pkc/ecc.js +9 -11
- package/src/crypto/pkc/ed25519.acvp.md +30 -34
- package/src/crypto/pkc/ed25519.js +453 -94
- package/src/crypto/pkc/hybrid-kat.provenance.md +4 -4
- package/src/crypto/pkc/hybridSign.js +103 -24
- package/src/crypto/pkc/ml_dsa.acvp.md +18 -18
- package/src/crypto/pkc/ml_dsa.js +29 -32
- package/src/crypto/pkc/ml_kem.acvp.md +7 -7
- package/src/crypto/pkc/ml_kem.js +15 -21
- package/src/crypto/pkc/rsa.acvp.md +11 -15
- package/src/crypto/pkc/rsa.js +7 -44
- package/src/crypto/pkc/slh_dsa.acvp.md +16 -16
- package/src/crypto/pkc/slh_dsa.js +16 -18
- package/src/crypto/pkc/x25519.acvp.md +13 -10
- package/src/crypto/pkc/x25519.js +273 -29
- package/src/crypto/utils/aes_modes.acvp.md +1 -2
- package/src/crypto/utils/aes_modes.js +2 -2
- package/src/crypto/utils/asn1-oid.js +1 -1
- package/src/crypto/utils/asn1.js +1 -1
- package/src/crypto/utils/bitArray.js +33 -48
- package/src/crypto/utils/bn.js +1 -1
- package/src/crypto/utils/jws.js +37 -41
- package/src/crypto/utils/keyformat.js +181 -2
- package/src/crypto/utils/pem.js +1 -1
- package/src/crypto/utils/random.acvp.md +5 -5
- package/src/crypto/utils/random.js +845 -846
- package/src/crypto/utils/rsaKeygen.acvp.md +3 -2
- package/src/crypto/utils/rsaKeygen.js +6 -6
- package/src/crypto/utils/totp.js +1 -1
- package/src/crypto/utils/uuid.acvp.md +5 -5
- package/src/crypto/utils/uuid.js +11 -10
- package/src/crypto/utils/x509.js +591 -0
- package/src/crypto/wasm/aes.js +1 -1
- package/src/crypto/wasm/aes.scalar.wasm +0 -0
- package/src/crypto/wasm/argon2.js +17 -1
- package/src/crypto/wasm/argon2.scalar.wasm +0 -0
- package/src/crypto/wasm/blake2b.scalar.wasm +0 -0
- package/src/crypto/wasm/blake2b.simd.wasm +0 -0
- package/src/crypto/wasm/chacha20poly1305.scalar.wasm +0 -0
- package/src/crypto/wasm/chacha20poly1305.simd.wasm +0 -0
- package/src/crypto/wasm/cmac.scalar.wasm +0 -0
- package/src/crypto/wasm/ecc.js +3 -3
- package/src/crypto/wasm/ecc.scalar.wasm +0 -0
- package/src/crypto/wasm/ed25519.js +1 -1
- package/src/crypto/wasm/ed25519.scalar.wasm +0 -0
- package/src/crypto/wasm/hkdf.scalar.wasm +0 -0
- package/src/crypto/wasm/hmac.scalar.wasm +0 -0
- package/src/crypto/wasm/ml_dsa.js +2 -2
- package/src/crypto/wasm/ml_dsa.scalar.wasm +0 -0
- package/src/crypto/wasm/ml_dsa.simd.wasm +0 -0
- package/src/crypto/wasm/ml_kem.js +2 -2
- package/src/crypto/wasm/ml_kem.scalar.wasm +0 -0
- package/src/crypto/wasm/ml_kem.simd.wasm +0 -0
- package/src/crypto/wasm/pbkdf2.js +8 -6
- package/src/crypto/wasm/pbkdf2.scalar.wasm +0 -0
- package/src/crypto/wasm/rsa.js +6 -5
- package/src/crypto/wasm/rsa.scalar.wasm +0 -0
- package/src/crypto/wasm/runtime.js +84 -17
- package/src/crypto/wasm/sha2.scalar.wasm +0 -0
- package/src/crypto/wasm/sha3.scalar.wasm +0 -0
- package/src/crypto/wasm/sha3.simd.wasm +0 -0
- package/src/crypto/wasm/slh_dsa.js +1 -1
- package/src/crypto/wasm/slh_dsa.scalar.wasm +0 -0
- package/src/crypto/wasm/x25519.js +1 -1
- package/src/crypto/wasm/x25519.scalar.wasm +0 -0
- package/src/crypto/webcrypto/aes.js +8 -2
- package/src/crypto/webcrypto/aeskw.js +7 -2
- package/src/crypto/webcrypto/digest.js +1 -15
- package/src/crypto/webcrypto/ecc.js +2 -2
- package/src/crypto/webcrypto/ed25519.js +2 -2
- package/src/crypto/webcrypto/hmac.js +2 -2
- package/src/crypto/webcrypto/rsa.js +7 -2
- package/src/crypto/webcrypto/x25519.js +2 -2
- package/src/dom/display/animate.js +1 -1
- package/src/dom/display/fullscreen.js +1 -1
- package/src/dom/fs/download.js +1 -1
- package/src/dom/fs/fileIntake.js +192 -0
- package/src/dom/fs/fsAccess.js +2 -3
- package/src/dom/fs/indexedDB.js +1 -1
- package/src/dom/fs/remoteStore.js +1 -1
- package/src/dom/fs/storage.js +1 -1
- package/src/dom/lifecycle/idle.js +1 -1
- package/src/dom/lifecycle/visibility.js +1 -1
- package/src/dom/lifecycle/wakeLock.js +1 -1
- package/src/dom/net/ajax.js +1 -1
- package/src/dom/net/network.js +1 -1
- package/src/dom/net/sse.js +1 -1
- package/src/dom/net/webrtc.js +1 -1
- package/src/dom/net/ws.js +1 -1
- package/src/dom/query/dnd.js +56 -4
- package/src/dom/query/dom.js +1 -1
- package/src/dom/query/events.js +1 -1
- package/src/dom/query/gesture.js +1 -1
- package/src/dom/query/media.js +1 -1
- package/src/dom/query/sound.js +333 -0
- package/src/dom/rendering/chart.js +736 -663
- package/src/dom/rendering/component.js +25 -14
- package/src/dom/rendering/devtools.js +2 -2
- package/src/dom/rendering/parser.js +155 -12
- package/src/dom/rendering/render.js +14 -4
- package/src/dom/rendering/sanitize.js +11 -4
- package/src/dom/rendering/secPolicy.js +6 -4
- package/src/dom/rendering/styleSheet.js +217 -0
- package/src/dom/rendering/template.js +72 -13
- package/src/dom/rendering/themeTokens.js +542 -522
- package/src/dom/rendering/uiSession-core.js +51 -6
- package/src/dom/rendering/uiSession-direct.js +1 -1
- package/src/dom/rendering/uiSession-list.js +4 -4
- package/src/dom/rendering/uiSession.js +1 -1
- package/src/dom/rendering/virtualScroll.js +341 -341
- package/src/dom/sensors/battery.js +1 -1
- package/src/dom/sensors/geolocation.js +1 -1
- package/src/dom/sensors/networkInfo.js +1 -1
- package/src/dom/sensors/sensors.js +1 -1
- package/src/dom/sw/backgroundSync.js +1 -1
- package/src/dom/sw/cache.js +1 -1
- package/src/dom/sw/installPrompt.js +151 -0
- package/src/dom/sw/precache.js +257 -0
- package/src/dom/sw/push.js +1 -1
- package/src/dom/sw/sharedWorker.js +1 -1
- package/src/dom/sw/swUpdate.js +239 -0
- package/src/dom/utils/a11y.js +1 -1
- package/src/dom/utils/clipboard.js +56 -6
- package/src/dom/utils/entropyCollector.js +1 -1
- package/src/dom/utils/focus.js +1 -1
- package/src/dom/utils/form.js +1 -1
- package/src/dom/utils/keybindings.js +600 -574
- package/src/dom/utils/leaderElection.js +1 -1
- package/src/dom/utils/notifications.js +1 -1
- package/src/dom/utils/permissions.js +107 -107
- package/src/dom/utils/route.js +14 -2
- package/src/dom/utils/ua.js +42 -28
- package/src/dom/utils/webauthn.js +1 -1
- package/src/io/binary/reader.js +1 -1
- package/src/io/binary/writer.js +1 -1
- package/src/io/calc/bigint.js +1 -1
- package/src/io/calc/crc32.js +28 -2
- package/src/io/calc/easing.js +514 -514
- package/src/io/codec/b64.js +189 -52
- package/src/io/codec/base32.js +1 -1
- package/src/io/codec/base58.js +1 -1
- package/src/io/codec/buffer.js +1 -1
- package/src/io/codec/cbor.js +111 -18
- package/src/io/codec/csv.js +1 -1
- package/src/io/codec/hex.js +51 -6
- package/src/io/codec/mime.js +1 -1
- package/src/io/codec/msgpack.js +47 -6
- package/src/io/codec/url.js +24 -7
- package/src/io/codec/utf8.js +5 -3
- package/src/io/codec/xml.js +1 -1
- package/src/io/compress/bitstream.js +2 -2
- package/src/io/compress/brotli.js +663 -163
- package/src/io/compress/brotli_dict.js +1 -1
- package/src/io/compress/brotli_dict_words.js +1 -1
- package/src/io/compress/brotli_frame.js +1 -1
- package/src/io/compress/brotli_shared.js +7 -7
- package/src/io/compress/deflate.js +87 -53
- package/src/io/compress/gzip.js +187 -74
- package/src/io/compress/huffman.js +24 -1
- package/src/io/compress/lz4.js +45 -7
- package/src/io/compress/lz77.js +148 -63
- package/src/io/compress/lzw.js +35 -19
- package/src/io/compress/zip.js +862 -815
- package/src/io/compress/zlib.js +87 -7
- package/src/io/i18n/i18n.js +1 -1
- package/src/io/math/fixed-point.js +1 -1
- package/src/io/math/geom.js +1 -1
- package/src/io/math/interp.js +1 -1
- package/src/io/math/linalg.js +10 -4
- package/src/io/math/stats.js +1 -1
- package/src/io/structures/btree.js +1 -1
- package/src/io/structures/heap.js +1 -1
- package/src/io/structures/lruCache.js +1 -1
- package/src/io/structures/ringBuffer.js +1 -1
- package/src/io/structures/tree-walker.js +1 -1
- package/src/io/structures/trie.js +1 -1
- package/src/io/sync/abort.js +1 -1
- package/src/io/sync/atomics.js +1 -1
- package/src/io/sync/cancellable.js +1 -1
- package/src/io/sync/channel.js +1 -1
- package/src/io/sync/mutex.js +1 -1
- package/src/io/sync/semaphore.js +1 -1
- package/src/io/sync/tokenBucket.js +1 -1
- package/src/io/text/ansi.js +1 -1
- package/src/io/text/html-entities.js +1 -1
- package/src/io/time/date.js +1 -1
- package/src/io/timing/clock.js +1 -1
- package/src/io/timing/rateLimit.js +1 -1
- package/src/io/timing/scheduler.js +1 -1
- package/src/io/utils/errors.js +1 -1
- package/src/io/utils/eventBus.js +1 -1
- package/src/io/utils/signal.js +1 -1
- package/src/io/utils/valid.js +1 -1
- package/src/main.js +1 -1
- package/src/process/message.js +1 -1
- package/src/process/rpc.js +7 -3
- package/src/process/workerPool.js +11 -4
- package/src/sanity/base.js +85 -39
- package/src/sanity/lockdown-apply.js +3 -3
- package/src/sanity/lockdown.js +58 -32
- package/src/sanity/wasm-gate.js +2 -2
- package/src/typed.js +7 -3
- package/third-party/NOTICE-brotli-dictionary.txt +69 -0
- package/third-party/NOTICE-fw-wasm-crypto.txt +576 -0
- package/third-party/NOTICE-whatwg-entities.txt +44 -0
- package/types/registry.generated.d.ts +7 -1
- package/types/typed.d.ts +7 -3
- package/dist/types/crypto/utils/aes_ctr.d.ts +0 -84
- package/dist/types/crypto/utils/aes_ctr.d.ts.map +0 -1
- package/docs/api/crypto/utils/aes_ctr.md +0 -71
- package/src/crypto/utils/aes_ctr.acvp.md +0 -67
- package/src/crypto/utils/aes_ctr.js +0 -134
package/docs/api/typed.md
CHANGED
|
@@ -31,9 +31,11 @@ Exactly the two exports of `src/typed.js`:
|
|
|
31
31
|
| `asTyped` | `(runtime: *) => *` | identity cast — re-types an existing `ModuleRuntime` at the type level; no runtime effect |
|
|
32
32
|
| `createRuntime` | `(modules?: *) => *` | builds a fresh `ModuleRuntime`, deep-registers `modules` (via `registerAllDeep`, so transitive `deps` come along) when provided, and returns it typed |
|
|
33
33
|
|
|
34
|
-
`createRuntime`'s `modules` argument accepts
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
`createRuntime`'s `modules` argument accepts an array of module definitions
|
|
35
|
+
(the default export of `@awacloud/fw/core/modules`), an object whose values
|
|
36
|
+
are module definitions, or a module namespace whose values are such arrays
|
|
37
|
+
(`import * as ns from '@awacloud/fw/core/modules'`, i.e. `{ default: [...] }`):
|
|
38
|
+
an array value is registered entry by entry.
|
|
37
39
|
|
|
38
40
|
**Narrowing caveat** (quoted from `src/typed.js`'s file header): *"`resolve`
|
|
39
41
|
is typed against the FULL catalog, not against what you actually
|
package/docs/dev/README.md
CHANGED
|
@@ -7,6 +7,8 @@ Practical sheets for **operating** the `@awacloud/fw` repo (running, building, g
|
|
|
7
7
|
| [runtime.md](./runtime.md) | Dev runtime choice: bun by default vs Node — which task, which prerequisites, lean install policy. |
|
|
8
8
|
| [testing.md](./testing.md) | Running the suite (bun / Node-vitest), categories, extended crypto, KAT/ACVP vectors. |
|
|
9
9
|
| [types.md](./types.md) | Generating `.d.ts`, typed registry, audit. |
|
|
10
|
+
| [bench.md](./bench.md) | Measuring performance: one cell per process, the A/A calibration, oracle parity, comparing two revisions. |
|
|
11
|
+
| [crypto-references.md](./crypto-references.md) | The logical references kept beside the flattened crypto modules, their differential tests, and the generators of the generated code. |
|
|
10
12
|
| [provenance.md](./provenance.md) | Origin of third-party-derived code (SJCL, BSD-2-Clause; TweetNaCl, public domain; Penner easing equations, BSD); the notices shipped out of prudence live under `third-party/`. |
|
|
11
13
|
| [publishing.md](./publishing.md) | **Lean** npm package (consumer) + transparency via git/CDN-git + CDN usage. |
|
|
12
14
|
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# Measuring performance — `tools/bench/perf.js`
|
|
2
|
+
|
|
3
|
+
The bench for a change that claims to be faster (or must not be slower): every
|
|
4
|
+
measurement in its own process, each cell gated by the noise an A/A run
|
|
5
|
+
measured on it, every fw result checked against a native oracle. It lives in
|
|
6
|
+
the source repository (`tools/bench/` is not part of the published package) and
|
|
7
|
+
runs under **Bun** (JavaScriptCore) or **Node** (V8) — a browser runs one of the
|
|
8
|
+
two engine families.
|
|
9
|
+
|
|
10
|
+
## Why one cell per process
|
|
11
|
+
|
|
12
|
+
Timing two engines in one process puts them behind the same call sites, and the
|
|
13
|
+
JIT's polymorphic dispatch then biases them: two byte-identical copies of one
|
|
14
|
+
primitive measured 4.1 ms and 4.6 ms in one process, 3.25 ms each in their own.
|
|
15
|
+
`perf.js` spawns one process per (case, engine, tree), with untimed warmups,
|
|
16
|
+
then times `reps` calls and keeps the median.
|
|
17
|
+
|
|
18
|
+
## Commands
|
|
19
|
+
|
|
20
|
+
```sh
|
|
21
|
+
# fw against its native oracle (node:zlib, node:crypto, Buffer …)
|
|
22
|
+
bun tools/bench/perf.js run [--only <regex>] [--rt bun|node]
|
|
23
|
+
|
|
24
|
+
# the A/A run: a tree compared with itself, per-cell drift written out
|
|
25
|
+
bun tools/bench/perf.js calibrate --tag aa
|
|
26
|
+
|
|
27
|
+
# a change: base (a git revision or an fw src dir) against the working tree
|
|
28
|
+
bun tools/bench/perf.js compare --base main --calibration ../../../evidence/fw-perf/aa/calibration-bun.json
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Options: `--procs N` (processes per cell and side; 3 for `run`, 5 otherwise),
|
|
32
|
+
`--reps N` (9), `--warmup N` (3), `--floor <percent>` (3), `--tag <name>`,
|
|
33
|
+
`--out <dir>` (default `evidence/fw-perf/<tag>/` at the repository root),
|
|
34
|
+
`--head <ref|dir>` (default the working tree). Run on an idle machine, one
|
|
35
|
+
bench at a time.
|
|
36
|
+
|
|
37
|
+
## Reading a compare
|
|
38
|
+
|
|
39
|
+
`compare` runs the two sides in alternating processes (base then head, then
|
|
40
|
+
head then base …) and gives each cell:
|
|
41
|
+
|
|
42
|
+
- `delta = head / base − 1`;
|
|
43
|
+
- `threshold = max(floor, the cell's calibrated A/A drift, the spread of either
|
|
44
|
+
side in this run)`, the spread being (max − min) / median over the processes;
|
|
45
|
+
- a verdict: **faster** (`delta < −threshold`), **slower** (`delta >
|
|
46
|
+
threshold`), **within noise**, **parity-fail** (the head result differs
|
|
47
|
+
from the oracle) or **error**.
|
|
48
|
+
|
|
49
|
+
It exits 1 when a cell is slower, fails parity or errors. A cell whose
|
|
50
|
+
threshold is large cannot gate a small change: read the threshold column before
|
|
51
|
+
claiming a 5 % gain — that is what the calibration is for.
|
|
52
|
+
|
|
53
|
+
## Files
|
|
54
|
+
|
|
55
|
+
| File | Content |
|
|
56
|
+
|---|---|
|
|
57
|
+
| `raw-<rt>.jsonl` | One line per process: case, engine, side, median / min / max ms, the parity check |
|
|
58
|
+
| `summary-<rt>.{json,md}` | `run`: median of the medians, spread, ratio to the oracle, parity |
|
|
59
|
+
| `compare-<rt>.{json,md}` | `compare` / `calibrate`: delta, threshold, verdict per cell |
|
|
60
|
+
| `calibration-<rt>.json` | `calibrate`: `{ drift: { "<case>\|<engine>": fraction } }` |
|
|
61
|
+
|
|
62
|
+
The cases (`tools/bench/perf-cases.js`) cover compression (deflate, inflate,
|
|
63
|
+
brotli, lz4), checksums, hashes, ciphers, signatures, codecs and the RNG; each
|
|
64
|
+
takes its inputs from the deterministic corpora of `tools/bench/_corpora.js`.
|
|
65
|
+
|
|
66
|
+
## The codec A/B harness
|
|
67
|
+
|
|
68
|
+
`tools/bench/codec-levels.js` compares deflate / brotli / lz4 / the huffman and
|
|
69
|
+
bitstream primitives level by level against a git baseline, with
|
|
70
|
+
cross-decoding and oracle legs. Its CLI times each engine in its own process
|
|
71
|
+
as well (`--procs N`, default 3, the order alternating) and gives each cell an
|
|
72
|
+
encode and a decode verdict against `max(--floor, both spreads)`. Run without
|
|
73
|
+
`--baseline`, it is an A/A run: a cell that reads anything but "within noise"
|
|
74
|
+
there cannot gate a change at those settings — raise `--procs` / `--reps`
|
|
75
|
+
before reading a small difference. `--procs 1` keeps the in-process timing,
|
|
76
|
+
labelled as biased. See its header.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Crypto references and generators
|
|
2
|
+
|
|
3
|
+
## Why
|
|
4
|
+
|
|
5
|
+
The fast crypto modules of `@awacloud/fw` are unrolled (straight-line code on locals) or bitsliced: quick, but hard to read against the standard they implement. Each flattened module keeps its logical form beside it, in git only, so a reader can check the algorithm in its textbook shape and a test can prove the fast code equal to it.
|
|
6
|
+
|
|
7
|
+
## The rule
|
|
8
|
+
|
|
9
|
+
- One `<module>.reference.js` per flattened module, co-located with the fast module.
|
|
10
|
+
- One export: `create<X>Reference`. The reference has no import and does no work at load.
|
|
11
|
+
- It is never registered: no entry in `src/core/modules.js`, the catalog, the typed registry or the API surface.
|
|
12
|
+
- A differential test `<module>.reference.test.js` imports it (it is its only importer) and compares it with the fast module.
|
|
13
|
+
- It is excluded from the npm tarball by `!src/**/*.reference.js` in `files[]`, from the exports map by `null` keys, and from the declaration tree by `tsconfig.types.json`.
|
|
14
|
+
|
|
15
|
+
"Published only in the monorepo" means exactly this: the files are in git and absent from the npm package. This page ships in the package, so it links them by absolute repository URL.
|
|
16
|
+
|
|
17
|
+
The integration test `tests/crypto-references.integration.test.js` holds these properties.
|
|
18
|
+
|
|
19
|
+
## Ledger
|
|
20
|
+
|
|
21
|
+
| Module | Flattened by | Reference | What the reference is | Generated region (crypto-gen id) | Differential test |
|
|
22
|
+
|---|---|---|---|---|---|
|
|
23
|
+
| `aes` | `240fc703a` (T21) | [`aes.reference.js`](https://github.com/awacloud/awa/blob/main/packages/front/fw/src/crypto/cipher/aes.reference.js) | The pre-bitsliced constant-time round AES (masked-lookup S-box, branchless xtime MixColumns) with its T-table path, plus the loop form of the generated GF(2^8) product | `aes-gf` | [`aes.reference.test.js`](https://github.com/awacloud/awa/blob/main/packages/front/fw/src/crypto/cipher/aes.reference.test.js) |
|
|
24
|
+
| `ed25519` | `ecd1c5e7f` (T25) | [`ed25519.reference.js`](https://github.com/awacloud/awa/blob/main/packages/front/fw/src/crypto/pkc/ed25519.reference.js) | Ed25519 (RFC 8032) in loop form: TweetNaCl multiply accumulation, square-and-multiply inversion, bit-by-bit double-and-add | `field25519-ed` | [`ed25519.reference.test.js`](https://github.com/awacloud/awa/blob/main/packages/front/fw/src/crypto/pkc/ed25519.reference.test.js) |
|
|
25
|
+
| `x25519` | `ecd1c5e7f` (T25) | [`x25519.reference.js`](https://github.com/awacloud/awa/blob/main/packages/front/fw/src/crypto/pkc/x25519.reference.js) | X25519 (RFC 7748) in loop form: Montgomery ladder over the TweetNaCl multiply loop | `field25519-x` | [`x25519.reference.test.js`](https://github.com/awacloud/awa/blob/main/packages/front/fw/src/crypto/pkc/x25519.reference.test.js) |
|
|
26
|
+
| `chacha20` | `6ffb948ef` (T26) | [`chacha20.reference.js`](https://github.com/awacloud/awa/blob/main/packages/front/fw/src/crypto/cipher/chacha20.reference.js) | ChaCha20 (RFC 8439): state as an array of 16 words, a quarter-round function, 10 double rounds as a loop, byte-by-byte XOR | `chacha20-block` | [`chacha20.reference.test.js`](https://github.com/awacloud/awa/blob/main/packages/front/fw/src/crypto/cipher/chacha20.reference.test.js) |
|
|
27
|
+
| `poly1305` | `6ffb948ef` (T26) | [`poly1305.reference.js`](https://github.com/awacloud/awa/blob/main/packages/front/fw/src/crypto/hash/poly1305.reference.js) | Poly1305 (RFC 8439 section 2.5) as the `BigInt` evaluation of section 2.5.1 (not constant-time) | `poly1305-blocks` | [`poly1305.reference.test.js`](https://github.com/awacloud/awa/blob/main/packages/front/fw/src/crypto/hash/poly1305.reference.test.js) |
|
|
28
|
+
| `blake2b` | `c71ad9989` (T26) | [`blake2b.reference.js`](https://github.com/awacloud/awa/blob/main/packages/front/fw/src/crypto/hash/blake2b.reference.js) | BLAKE2b (RFC 7693): the rolled compression, G mixing over (hi, lo) halves with 64-bit helpers, 12 rounds as a loop over `SIGMA` | `blake2b-compress` | [`blake2b.reference.test.js`](https://github.com/awacloud/awa/blob/main/packages/front/fw/src/crypto/hash/blake2b.reference.test.js) |
|
|
29
|
+
| `sha3` | `abf082855` (T26) | [`sha3.reference.js`](https://github.com/awacloud/awa/blob/main/packages/front/fw/src/crypto/hash/sha3.reference.js) | SHA-3 and SHAKE (FIPS 202): the rolled Keccak-f[1600] (theta, rho + pi, chi, iota as loops over 25 lanes) and a byte-by-byte sponge | `keccak-f1600` | [`sha3.reference.test.js`](https://github.com/awacloud/awa/blob/main/packages/front/fw/src/crypto/hash/sha3.reference.test.js) |
|
|
30
|
+
| `sha256` | `9e89e3d06` (T26) | [`sha256.reference.js`](https://github.com/awacloud/awa/blob/main/packages/front/fw/src/crypto/hash/sha256.reference.js) | SHA-256 (FIPS 180-4): the rolled compression, a rolling 16-word schedule and a 64-round loop, no byte fast path | `sha256-compress` | [`sha256.reference.test.js`](https://github.com/awacloud/awa/blob/main/packages/front/fw/src/crypto/hash/sha256.reference.test.js) |
|
|
31
|
+
|
|
32
|
+
`sha512` (`683022cec`) moved to int32 arrays and a byte fast path, but its compression is still a loop, so it has no reference.
|
|
33
|
+
|
|
34
|
+
## Generators
|
|
35
|
+
|
|
36
|
+
`tools/crypto-gen.js` regenerates the straight-line regions of the fast modules. The committed module is the oracle: when a fragment differs, the generator is corrected, never the module. From `packages/front/fw`:
|
|
37
|
+
|
|
38
|
+
- `bun tools/crypto-gen.js --check` compares every committed region with its regenerated fragment (exit 0 when all are `OK`);
|
|
39
|
+
- `bun tools/crypto-gen.js --write` replaces each region by its fragment;
|
|
40
|
+
- `bun tools/crypto-gen.js --print <id>` prints one fragment.
|
|
41
|
+
|
|
42
|
+
The eight targets: `aes-gf`, `field25519-ed`, `field25519-x`, `chacha20-block`, `poly1305-blocks`, `sha256-compress`, `keccak-f1600`, `blake2b-compress`.
|
|
43
|
+
|
|
44
|
+
## Changing a fast module
|
|
45
|
+
|
|
46
|
+
1. Edit the fast module.
|
|
47
|
+
2. Run its differential test (`bun test ./src/crypto/<dir>/<module>.reference.test.js`).
|
|
48
|
+
3. Run `bun tools/crypto-gen.js --check`.
|
|
49
|
+
|
|
50
|
+
A generated region is not edited by hand: change the generator in `tools/crypto-gen.js`, then run `--write`.
|
|
51
|
+
|
|
52
|
+
## No reference yet
|
|
53
|
+
|
|
54
|
+
`pbkdf2` (flattened by `9e89e3d06`, T26) has no reference file, by the owner's amendment OP-B35-1116: `pbkdf2.js` still carries the general RFC 8018 loop, so a copy would duplicate it. Its differential test, [`pbkdf2.differential.test.js`](https://github.com/awacloud/awa/blob/main/packages/front/fw/src/crypto/hash/pbkdf2.differential.test.js), compares the two-compression fast path with that loop.
|
package/docs/dev/provenance.md
CHANGED
|
@@ -3,14 +3,19 @@
|
|
|
3
3
|
## Scope
|
|
4
4
|
|
|
5
5
|
This page records **origin**. Where an origin's licence requires retaining its
|
|
6
|
-
notice, the notice ships under `third-party
|
|
7
|
-
BSD-
|
|
8
|
-
|
|
6
|
+
notice, the notice ships under `third-party/`: SJCL is BSD-2-Clause, the Penner / jQuery
|
|
7
|
+
Easing equations are BSD-licensed, the WHATWG entity table is BSD-3-Clause,
|
|
8
|
+
the Brotli dictionary carries the RFC 7932 code-component terms and the
|
|
9
|
+
google/brotli MIT notice, and the WASM binaries carry the notices of the C
|
|
10
|
+
sources they are built from. TweetNaCl (public domain) carries no obligation.
|
|
9
11
|
|
|
10
12
|
| File | Covers |
|
|
11
13
|
|---|---|
|
|
12
14
|
| `third-party/NOTICE-sjcl` | the six SJCL-derived files below — SJCL copyright notice and BSD 2-clause text |
|
|
13
15
|
| `third-party/NOTICE-penner-easing` | `src/io/calc/easing.js` — jQuery Easing v1.3 and Robert Penner easing-equations BSD notices |
|
|
16
|
+
| `third-party/NOTICE-whatwg-entities.txt` | `src/io/text/html-entities.js` — the WHATWG copyright and BSD 3-clause text |
|
|
17
|
+
| `third-party/NOTICE-brotli-dictionary.txt` | `src/io/compress/brotli_dict.bin` — the RFC 7932 code-component licence and the google/brotli MIT notice |
|
|
18
|
+
| `third-party/NOTICE-fw-wasm-crypto.txt` | `src/crypto/wasm/*.wasm` — the notices of the vendored C sources (a copy of `@awacloud/fw-wasm-crypto`'s `vendor/NOTICE`) |
|
|
14
19
|
|
|
15
20
|
## SJCL-derived (BSD-2-Clause)
|
|
16
21
|
|
|
@@ -48,7 +53,10 @@ notice is `third-party/NOTICE-sjcl`.
|
|
|
48
53
|
| `x25519` | `src/crypto/pkc/x25519.js` |
|
|
49
54
|
|
|
50
55
|
Both derive from the TweetNaCl reference implementation (Bernstein et al.,
|
|
51
|
-
public domain).
|
|
56
|
+
public domain). This project's own work on top: the unrolled field multiply
|
|
57
|
+
and square, the inversion / square-root addition chains, ed25519's
|
|
58
|
+
constant-time base-point table and its signed-digit recoding, and the
|
|
59
|
+
windowed variable-base multiplication of `verify`.
|
|
52
60
|
|
|
53
61
|
## Penner easing equations
|
|
54
62
|
|
|
@@ -60,6 +68,23 @@ Robert Penner publishes the equations under the MIT and 3-clause BSD
|
|
|
60
68
|
licences; jQuery Easing v1.3 (George McGinley Smith) is BSD-licensed. Both
|
|
61
69
|
BSD notices ship in `third-party/NOTICE-penner-easing`.
|
|
62
70
|
|
|
71
|
+
## Data tables
|
|
72
|
+
|
|
73
|
+
| Data | File | Origin | Licence |
|
|
74
|
+
|---|---|---|---|
|
|
75
|
+
| Named character references | `src/io/text/html-entities.js` (the inlined table, 2 125 entries) | WHATWG HTML Standard, `https://html.spec.whatwg.org/entities.json` | Copyright © WHATWG (Apple, Google, Mozilla, Microsoft); the Standard is CC BY 4.0, and portions incorporated into source code are BSD-3-Clause instead |
|
|
76
|
+
| Brotli static dictionary | `src/io/compress/brotli_dict.bin` (122 784 bytes) | RFC 7932 Appendix A, bit-identical (CRC-32 `0x5136CB04`, as the appendix states); the file was copied from `google/brotli` `c/common/dictionary.bin` | RFC 7932 code components: the IETF Trust's BSD terms (Trust Legal Provisions § 4.e); google/brotli: MIT |
|
|
77
|
+
|
|
78
|
+
## WebAssembly binaries
|
|
79
|
+
|
|
80
|
+
The 22 `src/crypto/wasm/*.wasm` files are the build of `@awacloud/fw-wasm-crypto`
|
|
81
|
+
(byte-identical to its `dist/MANIFEST.sha256`, checked by
|
|
82
|
+
`tests/pack-contents.integration.test.js`). They are compiled from that
|
|
83
|
+
package's own C sources and from vendored mlkem-native, PQClean, OpenSSL
|
|
84
|
+
SLH-DSA, BearSSL, fiat-crypto and libsodium sources; the per-tree origin is
|
|
85
|
+
locked in its `vendor/PROVENANCE.json`, and the notices ship here as
|
|
86
|
+
`third-party/NOTICE-fw-wasm-crypto.txt`.
|
|
87
|
+
|
|
63
88
|
## Everything else
|
|
64
89
|
|
|
65
90
|
Compression (`io/compress`): `deflate`, `huffman`, `bitstream` and `lz4`
|
|
@@ -75,6 +100,4 @@ exact-8-token overlap against the pre-rewrite sources and against fflate is
|
|
|
75
100
|
at most 1.8 %. They owe nothing.
|
|
76
101
|
|
|
77
102
|
All other crypto modules are original implementations validated against
|
|
78
|
-
NIST ACVP / RFC vectors (see `src/crypto/NIST_CONFORMANCE.md`)
|
|
79
|
-
tier's vendored C provenance lives in `@awacloud/fw-wasm-crypto`
|
|
80
|
-
(`vendor/PROVENANCE.json`, `vendor/NOTICE`).
|
|
103
|
+
NIST ACVP / RFC vectors (see `src/crypto/NIST_CONFORMANCE.md`).
|
package/docs/dev/publishing.md
CHANGED
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
## Applied
|
|
6
6
|
|
|
7
|
-
`package.json#files` publishes a **lean** tarball: `src/**/*.{js,md,bin}` (code, excluding tests/kat), `types/**/*.d.ts`, `dist/types/**/*.d.ts(.map)`, `dist/build/*.min.js` + `*.meta.json` + `*.bin` (no dev bundles nor JS-side `.map`), `tools/rendering/**/*.js` + `tools/_lib/cli-help.js` (fw-private tooling only — the mutualized `fw-bundler`/`fw-codegen` tools ship in their own packages, not here), `integrations/**/*.{js,d.ts,md,json}` (excluding `_e2e`), `docs` (excluding `api-generated`), `fw.config.json`, `README.md`, `CHANGELOG.md` — every `*.test.js`/`*.kat.js`/`*.test.html`/`_fixtures/**` excluded throughout. Measured (`npm pack --dry-run`, `packages/front/fw`): **2.4 MB compressed / 8.4 MB uncompressed, 1065 files** (vs 44 MB / 106 MB for the full tree).
|
|
7
|
+
`package.json#files` publishes a **lean** tarball: `src/**/*.{js,md,bin}` (code, excluding tests/kat), `types/**/*.d.ts`, `dist/types/**/*.d.ts(.map)`, `dist/build/*.min.js` + `*.meta.json` + `*.bin` (no dev bundles nor JS-side `.map`), `tools/rendering/**/*.js` + `tools/_lib/cli-help.js` (fw-private tooling only — the mutualized `fw-bundler`/`fw-codegen` tools ship in their own packages, not here), `integrations/**/*.{js,d.ts,md,json}` (excluding `_e2e`), `docs` (excluding `api-generated`), `fw.config.json`, `README.md`, `CHANGELOG.md` — every `*.test.js`/`*.kat.js`/`*.reference.js`/`*.test.html`/`_fixtures/**` excluded throughout. A `<module>.reference.js` is the logical (rolled) implementation kept beside a flattened crypto module; it lives in the git repository only. Measured (`npm pack --dry-run`, `packages/front/fw`): **2.4 MB compressed / 8.4 MB uncompressed, 1065 files** (vs 44 MB / 106 MB for the full tree).
|
|
8
8
|
|
|
9
9
|
## Publication status
|
|
10
10
|
|
|
11
|
-
`@awacloud/fw` is
|
|
11
|
+
`@awacloud/fw` is in the monorepo's publishable set (`Apache-2.0`), with no NOTICE requirement of its own. The repo has not published anything yet — the monorepo's export-pipeline and licence-stamp tooling is dry-run-only, used to gate and measure the export tree ahead of any real publication decision.
|
|
12
12
|
|
|
13
13
|
**Transparency (tests, `tests/_vectors`, KAT)** — outside the npm tarball, accessible:
|
|
14
14
|
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
|
|
25
25
|
## Decision record
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
`.
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
Two choices shape `package.json#files` (2026-08): the npm package stays lean,
|
|
28
|
+
with transparency through git and jsDelivr-GitHub; and `dist/build` ships
|
|
29
|
+
`.min.js` / `.meta.json` only, no dev bundles or `.map`. The full-tree
|
|
30
|
+
measurement behind them (44 MB / 106 MB) is superseded by the publication
|
|
31
|
+
data of the source repository (§ Publication status above).
|
package/docs/dev/runtime.md
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
The bun-default `package.json` scripts (`types:registry`, `integrations:catalog`,
|
|
19
19
|
`prebuild*`, `build:standalone`) run the declared devDependencies' bins
|
|
20
20
|
(`fw-codegen`/`fw-bundler`, put on `PATH` by `bun run`) directly — the
|
|
21
|
-
|
|
21
|
+
AWA monorepo's own task router is also available there, and is what
|
|
22
22
|
those bins execute under the hood.
|
|
23
23
|
|
|
24
24
|
## Build under Node — how it works
|
package/docs/dev/testing.md
CHANGED
|
@@ -56,6 +56,19 @@ $env:CRYPTO_FULL='1'; bun test src/crypto/ # PowerShell
|
|
|
56
56
|
- `*.kat.js` files (Known Answer Tests) are **data** imported by the `.test.js` files. Present in the git repo; read as-is by bun and Vitest (resolution via `import.meta.url`, runtime-agnostic).
|
|
57
57
|
- Large ACVP vectors (CTR_DRBG, ML-KEM/DSA, SLH-DSA, ~50 MB) live in `tests/_vectors/`; read with `CRYPTO_FULL=1`. Neither KATs nor vectors are in the npm tarball (lean package) — audit via git clone or jsDelivr-GitHub.
|
|
58
58
|
|
|
59
|
+
## CSP style leg (Chromium)
|
|
60
|
+
|
|
61
|
+
Proves in a real browser what the unit tier cannot: under a `style-src 'self'` policy (no `'unsafe-inline'`, no nonce — the policy of `tools/local-ui-kit`), `styleSheet.mode('adopted')` lets a component's scoped CSS and the `themeTokens` variables apply with no CSP violation, while the default `'element'` mode is refused (the negative control showing the policy really bites). The unit tier (happy-dom) implements no CSP, so it cannot enforce or observe this.
|
|
62
|
+
|
|
63
|
+
```sh
|
|
64
|
+
cd packages/front/fw
|
|
65
|
+
node tools/browser/csp-style/run.js # one JSON line; exit 0 = expectations hold, 1 = not, 3 = no Chromium
|
|
66
|
+
bun test ./tests/csp-style.integration.test.js # wrapper: asserts the JSON data again
|
|
67
|
+
bun run e2e:preview:install # provisions the in-repo Chromium cache (third_party/ms-playwright)
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
The driver runs under `node` (never inside the bun process), serves the package on `127.0.0.1` with the policy header on every response, and launches headless Chromium once per mode. **Skip rule**: the wrapper skips (with a `console.warn` naming the provisioning command) only when `node` is absent or the driver exits 3 (Chromium not provisioned). A skip is not evidence: a green run means a non-skipped run. This is a heavy job: do not run it beside another Chromium or GPU job.
|
|
71
|
+
|
|
59
72
|
## Portability note (bun vs Node)
|
|
60
73
|
|
|
61
74
|
Some tests may diverge depending on the engine (bun = JavaScriptCore, Node = V8/ICU) — typically DST date arithmetic and `Intl.supportedValuesOf('timeZone')`. These are engine differences, not runner differences; see the relevant module. The suite targets identical pass/fail between `bun test` and `vitest`.
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# L4 evidence
|
|
2
|
+
|
|
3
|
+
The monorepo's maturity scale asks three things of a package at L4, beyond
|
|
4
|
+
L3 (published docs mirror, licence, verified coverage): a **frozen public
|
|
5
|
+
API with a deprecation cycle**, **conformance vectors where a standard
|
|
6
|
+
applies**, and **proof in production**. This page sets out, for
|
|
7
|
+
`@awacloud/fw`, what backs each one and what does not. Every line names the
|
|
8
|
+
file that carries it.
|
|
9
|
+
|
|
10
|
+
## 1. Frozen public API
|
|
11
|
+
|
|
12
|
+
| What | Where |
|
|
13
|
+
|---|---|
|
|
14
|
+
| The surface, the SemVer rules and the deprecation cycle | [`docs/guide/stability.md`](../guide/stability.md) |
|
|
15
|
+
| The surface, machine-readable: 457 entry points, 208 registry modules with their API key trees, 232 declaration files hashed | [`docs/api/surface.json`](../api/surface.json) |
|
|
16
|
+
| The gate that keeps the package equal to it | `tests/api-surface.integration.test.js`, `bun run api:surface:check` (also run by `prepack`) |
|
|
17
|
+
| The API pages agree with it (every key a page lists exists) | `tests/docs-surface.integration.test.js` |
|
|
18
|
+
| No API object carries a `_` key; the internal slot is non-enumerable and read-only | `src/core/internal.test.js` |
|
|
19
|
+
| Every breaking change since the first release, with its migration | [`CHANGELOG.md`](../../CHANGELOG.md), **Breaking** |
|
|
20
|
+
|
|
21
|
+
What the gate does not see — a changed default, a new throw — is pinned by
|
|
22
|
+
each module's own tests against its documented behaviour.
|
|
23
|
+
|
|
24
|
+
## 2. Conformance vectors
|
|
25
|
+
|
|
26
|
+
### Cryptography
|
|
27
|
+
|
|
28
|
+
Every module that implements a FIPS, SP 800 or RFC algorithm runs the
|
|
29
|
+
standard's own vectors in its test file; the full matrix, with counts, is
|
|
30
|
+
[`src/crypto/NIST_CONFORMANCE.md`](../../src/crypto/NIST_CONFORMANCE.md):
|
|
31
|
+
|
|
32
|
+
- FIPS 180-4, 197, 202 and SP 800-38A–F, 90A: the publications' examples
|
|
33
|
+
plus inline NIST ACVP sub-samples (AFT and Monte Carlo chains, byte-exact);
|
|
34
|
+
- FIPS 203, 204, 205 (ML-KEM, ML-DSA, SLH-DSA): the ACVP key generation,
|
|
35
|
+
signature and encapsulation sets in `tests/_vectors/`, plus Wycheproof
|
|
36
|
+
subsets for ML-KEM, ML-DSA and X25519;
|
|
37
|
+
- RFC 8032, 7748, 8439, 8017, 7693, 9106, 5869, 8018: the RFCs' test
|
|
38
|
+
vectors;
|
|
39
|
+
- the hybrid combiners: the IETF X-Wing KAT and the LAMPS composite
|
|
40
|
+
interop vectors, with a reproducible self-KAT
|
|
41
|
+
([`pqc-hybrid-evidence.md`](./pqc-hybrid-evidence.md));
|
|
42
|
+
- JOSE and key formats: RFC 8037 § A.4, RFC 7468 § 5.
|
|
43
|
+
|
|
44
|
+
### Codecs and compression
|
|
45
|
+
|
|
46
|
+
| Module | Standard | Vectors |
|
|
47
|
+
|---|---|---|
|
|
48
|
+
| zlib, gzip, deflate | RFC 1950, 1951, 1952 | An external oracle at test time, both directions: `node:zlib` decodes what fw writes at every level, and fw decodes what `node:zlib` writes at every level, strategy and window size; preset dictionaries, multi-member gzip and trailer checks included (`src/io/compress/oracle.test.js`) |
|
|
49
|
+
| brotli | RFC 7932 | `node:zlib`'s brotli, both directions: fw decodes its output at every quality, streamed in small pushes (`src/io/compress/brotli*.test.js`), and it decodes fw's output at every quality, with and without the dictionary blob (`src/io/compress/brotli-oracle.test.js`) |
|
|
50
|
+
| zip | APPNOTE 6.3.x | Archives written by foreign tools — CPython's `zipfile`, .NET Framework's `ZipFile`, 7-Zip and libarchive — read entry by entry, Deflate64 refused (`src/io/compress/zip-foreign.test.js`, the archives in `tests/_vectors/zip-foreign/`); fw's own archives tested, listed and extracted by Info-ZIP UnZip where installed (`src/io/compress/zip-infozip-oracle.test.js`) |
|
|
51
|
+
| lzw | GIF89a, TIFF 6.0 § 13, PDF `LZWDecode` | GDI+ both ways: fw decodes the LZW data of GIF (8- and 4-bit) and TIFF (indexed, RGB) images GDI+ wrote (`src/io/compress/lzw-foreign.test.js`, `tests/_vectors/lzw-foreign/`), and GDI+ reads back GIFs fw encoded (`src/io/compress/lzw-gdiplus-oracle.test.js`, Windows) |
|
|
52
|
+
| msgpack | MessagePack spec | kawanet/msgpack-test-suite (MIT, vendored in `tests/_vectors/msgpack-test-suite/`): every listed encoding of 85 values decodes, and fw encodes each to one of them (`src/io/codec/msgpack-suite.test.js`) |
|
|
53
|
+
| base64, base32, base16 | RFC 4648 § 10 | The section's vectors, encode and decode (`src/io/codec/rfc4648.test.js`) |
|
|
54
|
+
| crc32, adler32 | CRC-32/ISO-HDLC, RFC 1950 | The `123456789` check value; `node:zlib` as the oracle |
|
|
55
|
+
| cbor | RFC 8949 | Every App. A example decoded; every App. F not-well-formed item refused (`src/io/codec/cbor-rfc8949.test.js`) |
|
|
56
|
+
| url | WHATWG URL | The runtime's `URL` and `URLSearchParams` as the oracle on a URL and query corpus (`src/io/codec/url.oracle.test.js`) |
|
|
57
|
+
| unicode | UAX #15 | The runtime's `String.prototype.normalize` as the oracle, the four forms (`src/io/text/unicode.oracle.test.js`) |
|
|
58
|
+
|
|
59
|
+
Where the vectors are still thin:
|
|
60
|
+
|
|
61
|
+
- **zip** — no archive from Info-ZIP's `zip` writer (the station has its
|
|
62
|
+
reader only), and the Win32 UnZip build ignores the UTF-8 flag, so its
|
|
63
|
+
name check covers the ASCII names there;
|
|
64
|
+
- **adf** — no external KDBX 3.x vector (the reference implementations are
|
|
65
|
+
GPL-licensed, none is vendored): the expected values are computed by an
|
|
66
|
+
independent composition of the underlying AES-256 and SHA-256, which run
|
|
67
|
+
their own ACVP vectors.
|
|
68
|
+
|
|
69
|
+
## 3. In production
|
|
70
|
+
|
|
71
|
+
Measured on 2026-11-11 by fetching each site's page and its entry script:
|
|
72
|
+
fw is identified in the served bytes by its licence banner and runtime
|
|
73
|
+
symbols.
|
|
74
|
+
|
|
75
|
+
| Site | What it is | How fw is served |
|
|
76
|
+
|---|---|---|
|
|
77
|
+
| `viewer.awacloud.com` | AWA Viewer, the document viewer PWA (PDF, Office, OpenDocument, Markdown) | Bundled in the app's entry script |
|
|
78
|
+
| `notepad.awacloud.com` | AWA Notepad, the offline plain-text editor PWA | Bundled in the app's entry script |
|
|
79
|
+
| `writer.awacloud.com` | AWA Writer, the DOCX / ODT word processor PWA | Bundled in the app's entry script |
|
|
80
|
+
| `awacloud.com` | The company website | The site's hydration script (static site generator, selective hydration) |
|
|
81
|
+
| `awaforge.eu` | The awaforge website | The site's hydration script |
|
|
82
|
+
| `towards.fr` | The towards website | The site's hydration script |
|
|
83
|
+
|
|
84
|
+
Every awa product library builds on fw as well: the office libraries (pdf,
|
|
85
|
+
ooxml, odf, md, fonts, oconv, oview), the SDE and SDC runtimes, site-kit,
|
|
86
|
+
ui-templates and graphic-anim.
|
|
@@ -22,9 +22,9 @@ primitives — no novel cryptography:
|
|
|
22
22
|
| `hybridKem` | X-Wing hybrid KEM (X25519 + ML-KEM-768) | [`src/crypto/pkc/hybridKem.js`](../../src/crypto/pkc/hybridKem.js) | [`hybridKem.md`](../api/crypto/pkc/hybridKem.md) |
|
|
23
23
|
| `hybridSign` | Composite PQ/T signatures (ML-DSA-65 ∧ Ed25519 / ECDSA-P-256) | [`src/crypto/pkc/hybridSign.js`](../../src/crypto/pkc/hybridSign.js) | [`hybridSign.md`](../api/crypto/pkc/hybridSign.md) |
|
|
24
24
|
|
|
25
|
-
**Package identity.** `@awacloud/fw` version `
|
|
25
|
+
**Package identity.** `@awacloud/fw` version `1.0.0`, maturity **L4** (per
|
|
26
26
|
`packages/front/fw/package.json`). Browser framework, ESM-only, zero npm
|
|
27
|
-
runtime dependencies. The package manifest declares `"license": "Apache-2.0"` and the package root ships a `LICENSE` file — both stamped from the ratified licence matrix (
|
|
27
|
+
runtime dependencies. The package manifest declares `"license": "Apache-2.0"` and the package root ships a `LICENSE` file — both stamped from the monorepo's ratified licence matrix on 2026-09-05 (the matrix and the stamping tool live in the source repository, not in this package). The package's release SBOM (§7) records this manifest value as its declared licence.
|
|
28
28
|
|
|
29
29
|
**Build provenance.** No bundler is required; modules resolve via HTML
|
|
30
30
|
import maps. Two deployment surfaces per module (both delivered): the DI descriptor (`runtime.resolve('hybridKem' | 'hybridSign')`)
|
|
@@ -153,7 +153,7 @@ The combiner constructions themselves are **draft-stage** (X-Wing -06, LAMPS
|
|
|
153
153
|
|
|
154
154
|
The composite/KEM constructions have **no** NIST validation program of their
|
|
155
155
|
own (§4.3). The underlying primitives carry their own validation evidence,
|
|
156
|
-
**cited here, not re-executed
|
|
156
|
+
**cited here, not re-executed for this page**:
|
|
157
157
|
|
|
158
158
|
| Primitive | Validation | Evidence |
|
|
159
159
|
|---|---|---|
|
|
@@ -192,7 +192,7 @@ evidence is in the `*.acvp.md` files cited in §4.1.
|
|
|
192
192
|
### 4.3 Coverage gaps (reproduced verbatim from the module docs)
|
|
193
193
|
|
|
194
194
|
The following two blocks are reproduced **verbatim** from the *Coverage gaps*
|
|
195
|
-
sections
|
|
195
|
+
sections of
|
|
196
196
|
[`hybridKem.md`](../api/crypto/pkc/hybridKem.md) and
|
|
197
197
|
[`hybridSign.md`](../api/crypto/pkc/hybridSign.md); the relative links inside
|
|
198
198
|
them resolve from `docs/api/crypto/pkc/`.
|
|
@@ -413,9 +413,9 @@ Mirrors the -19 re-vendor outcome
|
|
|
413
413
|
|---|---|
|
|
414
414
|
| Document | PQC-hybrid combiners — evaluation-evidence dossier |
|
|
415
415
|
| Covers | `@awacloud/fw` `hybridKem`, `hybridSign` (`fw.crypto.pkc`) |
|
|
416
|
-
| Package version | `@awacloud/fw`
|
|
416
|
+
| Package version | `@awacloud/fw` 1.0.0 (maturity L4) |
|
|
417
417
|
| Repository commit | The commit the signed release tag names — see [`verify-releases.md`](https://github.com/awacloud/awa/blob/main/docs/publication/verify-releases.md) |
|
|
418
|
-
| Snapshot date | 2026-
|
|
418
|
+
| Snapshot date | 2026-11-11 |
|
|
419
419
|
| Signature | This document carries **no signature of its own**. Its integrity is that of the release it ships in: the release tag is signed over SSH by the tag key `awa-tag-2026` (ed25519, classical), and the release's per-file digest manifest is signed by a detached hybrid envelope (ML-DSA-65 + ECDSA P-256, both must verify) — the manifest is the authoritative half. Keys: [`SECURITY.md`](https://github.com/awacloud/awa/blob/main/SECURITY.md) § Release keys; procedure: [`verify-releases.md`](https://github.com/awacloud/awa/blob/main/docs/publication/verify-releases.md) |
|
|
420
420
|
| Contact | security@awacloud.com — the reporting channel named in [`SECURITY.md`](https://github.com/awacloud/awa/blob/main/SECURITY.md) (§8) |
|
|
421
421
|
|
|
@@ -425,6 +425,7 @@ Mirrors the -19 re-vendor outcome
|
|
|
425
425
|
|---|---|---|
|
|
426
426
|
| 1 | 2026-07-09 | Initial issue. Constructions X-Wing -06, LAMPS composite-sigs -19; vectors 19 (X-Wing) + 32 (composite) green; combiner regen byte-identical. |
|
|
427
427
|
| 2 | 2026-09-23 | Supply-chain and document-control re-issue; §2–§6 and §9 unchanged. §7: SBOM generated per release in CycloneDX 1.6 + SPDX 2.3, unsigned in this release (was "pending"). §8: repo-as-SBOM rationale kept as the reason the SBOM is small (was "export pending"). §8: disclosure and maintenance policies now published (`SECURITY.md`, `MAINTENANCE.md`); the OpenPGP key is named as the reporting-channel key only. §10: maturity L3 (was L2). §10: "PGP signature" row replaced by "Signature" — no own signature; release tag (SSH) + hybrid-signed digest manifest. §10: contact is the `SECURITY.md` reporting channel. §1: internal tracking reference removed; licence fact kept. |
|
|
428
|
+
| 3 | 2026-11-11 | Package re-issue: maturity L4 (§1, §10). The API follows fw's one signature order, `verify(publicKey, signature, message, ctx?)` on both composite variants (it was `(publicKey, message, signature, ctx?)`); ML-DSA signs hedged by default, so the composite self-KAT signatures were regenerated through its deterministic DRBG (keys unchanged, provenance digest updated); the test-only primitives moved to the module's internal slot, outside the API. Constructions (X-Wing -06, LAMPS composite-sigs -19) and the official vectors unchanged, all green. |
|
|
428
429
|
|
|
429
430
|
**Re-issue triggers** (§1): a pinned construction/vector revision change; a
|
|
430
431
|
closed coverage gap (§4); a supply-chain inventory change (§8); SBOM signing
|
package/docs/guide/README.md
CHANGED
|
@@ -28,6 +28,7 @@ Core concepts and usage recipes for the framework.
|
|
|
28
28
|
| [Hot module replacement](./hmr.md) | `runtime.invalidate()`, the dehydrate/hydrate convention, and what is not preserved |
|
|
29
29
|
| [HMR per integration](./integrations-hmr.md) | What each integration supports today, and what the host bundler provides instead |
|
|
30
30
|
| [TypeScript](./typescript.md) | Cohabiting `.d.ts` declarations, worker-serialisation pitfall, narrow typings |
|
|
31
|
+
| [API stability](./stability.md) | What is frozen at 1.0.0, the SemVer rules, the deprecation cycle and the snapshot gate |
|
|
31
32
|
|
|
32
33
|
## Contribution conventions
|
|
33
34
|
|
package/docs/guide/_QUICK_REF.md
CHANGED
|
@@ -29,7 +29,7 @@ export const myModule = {
|
|
|
29
29
|
**Absolute rules** inside `factory(...)` :
|
|
30
30
|
- ❌ `window`, `document`, `globalThis.<DOM>`
|
|
31
31
|
- ❌ `Math.random`, `crypto.randomUUID`
|
|
32
|
-
- ❌ `eval`, `new Function(...)`, dynamic `import()`
|
|
32
|
+
- ❌ `eval`, `new Function(...)`, dynamic `import()` — one sanctioned exception: `crypto/wasm/runtime.js` lazily imports the `sanity/wasm-gate.js` capability module, a fw file, never user input
|
|
33
33
|
- ❌ `performance.now`/`performance.mark` (timing-channel)
|
|
34
34
|
- ❌ Side-effects at instantiation (no `fetch`, listeners, console at top-level)
|
|
35
35
|
- ❌ Closures over main-thread values (non-serialisable for workers)
|
|
@@ -163,7 +163,7 @@ status: complete|stub
|
|
|
163
163
|
|
|
164
164
|
### Canonical skeleton
|
|
165
165
|
|
|
166
|
-
|
|
166
|
+
````markdown
|
|
167
167
|
# <name>
|
|
168
168
|
|
|
169
169
|
> One-line description — ≤ 15 words.
|
|
@@ -204,7 +204,7 @@ const worker = fw.createWorker(...);
|
|
|
204
204
|
## See also
|
|
205
205
|
|
|
206
206
|
Relative links, one per line — `[<module>](./<module>.md) — relationship`.
|
|
207
|
-
|
|
207
|
+
````
|
|
208
208
|
|
|
209
209
|
**Mandatory sections**: Frontmatter, H1 + tagline, metadata line, `## Resolve`, `## API`, `## Examples`, `## Notes` (≥2 bullets), `## See also` (≥1 link). `## Worker Usage` if worker-safe.
|
|
210
210
|
|
|
@@ -234,7 +234,7 @@ docs/README.md (exhaustive table)
|
|
|
234
234
|
|
|
235
235
|
## 6. Task workflow — 7 phases
|
|
236
236
|
|
|
237
|
-
1. Implement `packages/front/fw/<path>/<name>.js`
|
|
237
|
+
1. Implement `packages/front/fw/<path>/<name>.js` with exactly the API the module page specifies.
|
|
238
238
|
2. Write `<name>.test.js` following § 3.
|
|
239
239
|
3. `bun test <test-file>` → **100% pass** (max 3 correction iterations, otherwise `failed`).
|
|
240
240
|
4. Write `docs/api/<path>/<name>.md` following § 4.
|
|
@@ -303,7 +303,7 @@ Mapping for `BATCH_N.md`: `done` → `Delivered`, `partial` → `Partial`, `bloc
|
|
|
303
303
|
| Modify `sanity/base.js` | Immutable lock |
|
|
304
304
|
| `test.skip` / `test.only` committed | Tests green or deleted |
|
|
305
305
|
| Skip the README cascade | Discoverability broken |
|
|
306
|
-
| Speculative API (methods beyond the
|
|
306
|
+
| Speculative API (methods beyond the specified one) | The specified API is prescriptive |
|
|
307
307
|
| Generous out-of-scope | `## Out` = as prescriptive as `## In` |
|
|
308
308
|
|
|
309
309
|
---
|
package/docs/guide/doc-format.md
CHANGED
|
@@ -30,7 +30,7 @@ status: complete|stub
|
|
|
30
30
|
|
|
31
31
|
## Canonical skeleton
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
````markdown
|
|
34
34
|
---
|
|
35
35
|
module: <name>
|
|
36
36
|
category: <path>
|
|
@@ -115,6 +115,7 @@ const worker = fw.createWorker(
|
|
|
115
115
|
|
|
116
116
|
Relative links, one per line — `[<related-module>](./<related-module>.md) — relationship`
|
|
117
117
|
and `[<relevant-guide>](../../guide/<guide>.md)`.
|
|
118
|
+
````
|
|
118
119
|
|
|
119
120
|
## Sections — required vs optional
|
|
120
121
|
|
|
@@ -222,7 +223,7 @@ docs/README.md
|
|
|
222
223
|
|
|
223
224
|
### Leaf category `README.md` format (`io/codec/README.md`)
|
|
224
225
|
|
|
225
|
-
|
|
226
|
+
````markdown
|
|
226
227
|
# IO / Codec
|
|
227
228
|
|
|
228
229
|
1-2 sentence description of the category's role.
|
|
@@ -239,7 +240,7 @@ docs/README.md
|
|
|
239
240
|
```js
|
|
240
241
|
// typical resolution snippet for this category
|
|
241
242
|
```
|
|
242
|
-
|
|
243
|
+
````
|
|
243
244
|
|
|
244
245
|
### Section `README.md` format (`io/README.md`)
|
|
245
246
|
|
|
@@ -69,7 +69,7 @@ anything.
|
|
|
69
69
|
|
|
70
70
|
## The Vite exception, precisely
|
|
71
71
|
|
|
72
|
-
|
|
72
|
+
One gap is closed: before, editing `fw.config.json`
|
|
73
73
|
or regenerating the committed module catalog while `vite dev` was running
|
|
74
74
|
required killing and restarting the dev server for the change to take
|
|
75
75
|
effect, because the plugin's internal state was built once at construction
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> Operational plan for adding a module to the framework. Aimed primarily at an LLM (Claude Sonnet 4.6+) or a developer running the procedure for the first time.
|
|
4
4
|
|
|
5
|
-
This page is an **execution plan**, not a course. For each
|
|
5
|
+
This page is an **execution plan**, not a course. For each step, it points to the reference guides to load.
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -15,11 +15,11 @@ This page is an **execution plan**, not a course. For each phase, it points to t
|
|
|
15
15
|
| [`test-format.md`](./test-format.md) | `*.test.js` file convention (bun) |
|
|
16
16
|
| [`doc-format.md`](./doc-format.md) | `docs/api/*.md` page convention + README cascade |
|
|
17
17
|
|
|
18
|
-
Load these 4 files into context before
|
|
18
|
+
Load these 4 files into context before step 1.
|
|
19
19
|
|
|
20
20
|
---
|
|
21
21
|
|
|
22
|
-
##
|
|
22
|
+
## Step 0 — Discovery / scoping
|
|
23
23
|
|
|
24
24
|
**Goal**: avoid duplicates, identify reusable dependencies.
|
|
25
25
|
|
|
@@ -77,7 +77,7 @@ If the module doesn't fit anywhere: ask the question before creating a new folde
|
|
|
77
77
|
|
|
78
78
|
---
|
|
79
79
|
|
|
80
|
-
##
|
|
80
|
+
## Step 1 — Source implementation
|
|
81
81
|
|
|
82
82
|
**Target**: `packages/front/fw/<path>/<name>.js`
|
|
83
83
|
|
|
@@ -154,7 +154,7 @@ export [...]` at the bottom. **No named exports.** Add:
|
|
|
154
154
|
|
|
155
155
|
---
|
|
156
156
|
|
|
157
|
-
##
|
|
157
|
+
## Step 2 — Tests
|
|
158
158
|
|
|
159
159
|
**Target**: `packages/front/fw/<path>/<name>.test.js`
|
|
160
160
|
|
|
@@ -195,7 +195,7 @@ bun test packages/front/fw/<path>/
|
|
|
195
195
|
|
|
196
196
|
---
|
|
197
197
|
|
|
198
|
-
##
|
|
198
|
+
## Step 3 — Documentation
|
|
199
199
|
|
|
200
200
|
**Target**: `docs/api/<path>/<name>.md`
|
|
201
201
|
|
|
@@ -219,7 +219,7 @@ All links must be **relative** and functional. No absolute URLs to the repo.
|
|
|
219
219
|
|
|
220
220
|
---
|
|
221
221
|
|
|
222
|
-
##
|
|
222
|
+
## Step 4 — README cascade
|
|
223
223
|
|
|
224
224
|
**Every** module creation impacts a README chain. Update **in order**:
|
|
225
225
|
|
|
@@ -253,7 +253,7 @@ Maintain consistent ordering (grouped by category as in the existing file).
|
|
|
253
253
|
|
|
254
254
|
---
|
|
255
255
|
|
|
256
|
-
##
|
|
256
|
+
## Step 5 — Final verification
|
|
257
257
|
|
|
258
258
|
```bash
|
|
259
259
|
# 1. All tests in the directory pass
|