@floegence/flowersec-core 2.5.4 → 3.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/README.md +46 -18
- package/dist/browser/connectSessionV3.d.ts +13 -0
- package/dist/browser/connectSessionV3.js +75 -0
- package/dist/browser/index.d.ts +3 -2
- package/dist/browser/index.js +2 -1
- package/dist/browser/v2.d.ts +3 -0
- package/dist/browser/v2.js +2 -0
- package/dist/facade.d.ts +15 -8
- package/dist/facade.js +5 -4
- package/dist/interop/proxyServerPeer.js +1 -1
- package/dist/interop/serverParityPeer.js +8 -1
- package/dist/node/acceptor.d.ts +10 -0
- package/dist/node/acceptor.js +45 -2
- package/dist/node/acceptorV3.d.ts +57 -0
- package/dist/node/acceptorV3.js +227 -0
- package/dist/node/connectSessionV3.d.ts +21 -0
- package/dist/node/connectSessionV3.js +73 -0
- package/dist/node/index.d.ts +15 -10
- package/dist/node/index.js +6 -5
- package/dist/node/nativeTransportAddon.d.ts +39 -1
- package/dist/node/nativeTransportAddon.js +29 -5
- package/dist/node/rawQuicAdapterV3.d.ts +10 -0
- package/dist/node/rawQuicAdapterV3.js +76 -0
- package/dist/node/rawQuicServerV3.d.ts +24 -0
- package/dist/node/rawQuicServerV3.js +34 -0
- package/dist/node/runtimeAuthorizationV3.d.ts +29 -0
- package/dist/node/runtimeAuthorizationV3.js +126 -0
- package/dist/node/tunnelRuntimeV3.d.ts +57 -0
- package/dist/node/tunnelRuntimeV3.js +857 -0
- package/dist/node/v2.d.ts +11 -0
- package/dist/node/v2.js +6 -0
- package/dist/node/webSocketServerV3.d.ts +27 -0
- package/dist/node/webSocketServerV3.js +219 -0
- package/dist/public/streamHandlers.d.ts +3 -0
- package/dist/public/streamHandlers.js +6 -1
- package/dist/v2/index.d.ts +14 -0
- package/dist/v2/index.js +7 -0
- package/dist/v2/protocol.js +23 -32
- package/dist/v2/session.d.ts +5 -0
- package/dist/v2/session.js +90 -35
- package/dist/v3/admissionError.d.ts +4 -0
- package/dist/v3/admissionError.js +8 -0
- package/dist/v3/artifact.d.ts +145 -0
- package/dist/v3/artifact.js +1162 -0
- package/dist/v3/artifactLease.d.ts +17 -0
- package/dist/v3/artifactLease.js +109 -0
- package/dist/v3/browserRuntime.d.ts +37 -0
- package/dist/v3/browserRuntime.js +197 -0
- package/dist/v3/browserSessionRuntime.d.ts +2 -0
- package/dist/v3/browserSessionRuntime.js +21 -0
- package/dist/v3/capability.d.ts +32 -0
- package/dist/v3/capability.js +345 -0
- package/dist/v3/carrier.d.ts +84 -0
- package/dist/v3/carrier.js +411 -0
- package/dist/v3/connectionController.d.ts +87 -0
- package/dist/v3/connectionController.js +805 -0
- package/dist/v3/contract.d.ts +65 -0
- package/dist/v3/contract.js +3 -0
- package/dist/v3/controller.d.ts +43 -0
- package/dist/v3/controller.js +303 -0
- package/dist/v3/handshake.d.ts +81 -0
- package/dist/v3/handshake.js +471 -0
- package/dist/v3/jcs.d.ts +6 -0
- package/dist/v3/jcs.js +69 -0
- package/dist/v3/jsonPreflight.d.ts +1 -0
- package/dist/v3/jsonPreflight.js +251 -0
- package/dist/v3/nodeRuntime.d.ts +40 -0
- package/dist/v3/nodeRuntime.js +315 -0
- package/dist/v3/nodeSessionRuntime.d.ts +2 -0
- package/dist/v3/nodeSessionRuntime.js +13 -0
- package/dist/v3/protocol.d.ts +99 -0
- package/dist/v3/protocol.js +773 -0
- package/dist/v3/publicApi.d.ts +12 -0
- package/dist/v3/publicApi.js +46 -0
- package/dist/v3/publicSession.d.ts +1 -0
- package/dist/v3/publicSession.js +281 -0
- package/dist/v3/retryDisposition.d.ts +16 -0
- package/dist/v3/retryDisposition.js +30 -0
- package/dist/v3/runtimeAdapters.d.ts +9 -0
- package/dist/v3/runtimeAdapters.js +109 -0
- package/dist/v3/security.d.ts +34 -0
- package/dist/v3/security.js +100 -0
- package/dist/v3/serverAdmission.d.ts +38 -0
- package/dist/v3/serverAdmission.js +223 -0
- package/dist/v3/session.d.ts +318 -0
- package/dist/v3/session.js +2289 -0
- package/dist/v3/sessionConnector.d.ts +37 -0
- package/dist/v3/sessionConnector.js +440 -0
- package/dist/v3/streamLifetimeLedger.d.ts +31 -0
- package/dist/v3/streamLifetimeLedger.js +131 -0
- package/dist/v3/streamMetadata.d.ts +1 -0
- package/dist/v3/streamMetadata.js +7 -0
- package/dist/v3/transportConstants.d.ts +56 -0
- package/dist/v3/transportConstants.js +59 -0
- package/dist/v3/unreliableMessage.d.ts +44 -0
- package/dist/v3/unreliableMessage.js +284 -0
- package/dist/v3/webSocketCarrier.d.ts +31 -0
- package/dist/v3/webSocketCarrier.js +370 -0
- package/dist/v3/webTransportCarrier.d.ts +27 -0
- package/dist/v3/webTransportCarrier.js +534 -0
- package/package.json +4 -4
- package/sbom/cyclonedx.json +6 -6
- package/sbom/spdx.json +11 -11
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
export declare class ProtocolV3Error extends Error {
|
|
2
|
+
}
|
|
3
|
+
export declare enum DirectionV3 {
|
|
4
|
+
ClientToServer = 1,
|
|
5
|
+
ServerToClient = 2
|
|
6
|
+
}
|
|
7
|
+
export declare enum CipherSuiteV3 {
|
|
8
|
+
ChaCha20Poly1305 = 1,
|
|
9
|
+
AES256GCM = 2
|
|
10
|
+
}
|
|
11
|
+
export type EpochRootsV3 = Readonly<{
|
|
12
|
+
epochSecret: Uint8Array;
|
|
13
|
+
controlRoot: Uint8Array;
|
|
14
|
+
streamRoot: Uint8Array;
|
|
15
|
+
setupRoot: Uint8Array;
|
|
16
|
+
rekeyRoot: Uint8Array;
|
|
17
|
+
}>;
|
|
18
|
+
export type RecordMaterialV3 = Readonly<{
|
|
19
|
+
secret: Uint8Array;
|
|
20
|
+
recordKey: Uint8Array;
|
|
21
|
+
noncePrefix: Uint8Array;
|
|
22
|
+
}>;
|
|
23
|
+
export type SetupPrefaceV3 = Readonly<{
|
|
24
|
+
openerRole: 1 | 2;
|
|
25
|
+
logicalStreamID: bigint;
|
|
26
|
+
initialSendEpoch: number;
|
|
27
|
+
setupMAC: Uint8Array;
|
|
28
|
+
}>;
|
|
29
|
+
export type RecordHeaderV3 = Readonly<{
|
|
30
|
+
epoch: number;
|
|
31
|
+
sequence: bigint;
|
|
32
|
+
ciphertextLength: number;
|
|
33
|
+
}>;
|
|
34
|
+
export type OpenPayloadV3 = Readonly<{
|
|
35
|
+
logicalStreamID: bigint;
|
|
36
|
+
fss3Hash: Uint8Array;
|
|
37
|
+
kind: string;
|
|
38
|
+
metadata: Uint8Array;
|
|
39
|
+
}>;
|
|
40
|
+
export declare enum InnerTypeV3 {
|
|
41
|
+
Open = 1,
|
|
42
|
+
OpenACK = 2,
|
|
43
|
+
OpenReject = 3,
|
|
44
|
+
Data = 4,
|
|
45
|
+
FIN = 5,
|
|
46
|
+
StreamKeyUpdate = 6,
|
|
47
|
+
SessionReady = 16,
|
|
48
|
+
Ping = 17,
|
|
49
|
+
Pong = 18,
|
|
50
|
+
SessionKeyUpdate = 19,
|
|
51
|
+
StreamReset = 20,
|
|
52
|
+
GoAway = 21,
|
|
53
|
+
SessionClose = 22,
|
|
54
|
+
SessionReadyACK = 23,
|
|
55
|
+
SessionKeyUpdateACK = 24,
|
|
56
|
+
StreamKeyUpdateACK = 25,
|
|
57
|
+
SessionReadyConfirm = 26
|
|
58
|
+
}
|
|
59
|
+
export type InnerRecordV3 = Readonly<{
|
|
60
|
+
type: InnerTypeV3;
|
|
61
|
+
payload: Uint8Array;
|
|
62
|
+
}>;
|
|
63
|
+
export type OpenRejectV3 = Readonly<{
|
|
64
|
+
openHash: Uint8Array;
|
|
65
|
+
reason: number;
|
|
66
|
+
knownReason: boolean;
|
|
67
|
+
}>;
|
|
68
|
+
export type StreamKeyUpdateACKV3 = Readonly<{
|
|
69
|
+
logicalStreamID: bigint;
|
|
70
|
+
transition: bigint;
|
|
71
|
+
epoch: number;
|
|
72
|
+
}>;
|
|
73
|
+
export declare function deriveEpochZero(sessionPRK: Uint8Array, direction: DirectionV3): EpochRootsV3;
|
|
74
|
+
export declare function deriveEpochRoots(epochSecret: Uint8Array): EpochRootsV3;
|
|
75
|
+
export declare function deriveNextEpoch(rekeyRoot: Uint8Array, h3: Uint8Array, direction: DirectionV3, nextEpoch: number): Uint8Array;
|
|
76
|
+
export declare function deriveStreamMaterial(streamRoot: Uint8Array, h3: Uint8Array, logicalStreamID: bigint, direction: DirectionV3, epoch: number): RecordMaterialV3;
|
|
77
|
+
export declare function deriveControlMaterial(controlRoot: Uint8Array, h3: Uint8Array, direction: DirectionV3, epoch: number): RecordMaterialV3;
|
|
78
|
+
export declare function computeSetupMAC(setupRoot: Uint8Array, h3: Uint8Array, preface: SetupPrefaceV3): Uint8Array;
|
|
79
|
+
export declare function encodeSetupPreface(preface: SetupPrefaceV3): Uint8Array;
|
|
80
|
+
export declare function decodeSetupPrefaceV3(raw: Uint8Array): SetupPrefaceV3;
|
|
81
|
+
export declare function verifySetupMAC(setupRoot: Uint8Array, h3: Uint8Array, preface: SetupPrefaceV3): boolean;
|
|
82
|
+
export declare function computeFSS3HashV3(raw: Uint8Array): Uint8Array;
|
|
83
|
+
export declare function encodeRecordHeader(header: RecordHeaderV3): Uint8Array;
|
|
84
|
+
export declare function decodeRecordHeader(raw: Uint8Array): RecordHeaderV3;
|
|
85
|
+
export declare function buildDataInner(payload: Uint8Array): Uint8Array;
|
|
86
|
+
export declare function encodeInnerRecordV3(type: InnerTypeV3, payload: Uint8Array): Uint8Array;
|
|
87
|
+
export declare function decodeInnerRecordV3(raw: Uint8Array): InnerRecordV3;
|
|
88
|
+
export declare function encodeOpenPayload(payload: OpenPayloadV3): Uint8Array;
|
|
89
|
+
export declare function decodeOpenPayload(raw: Uint8Array): OpenPayloadV3;
|
|
90
|
+
export declare function computeOpenHashV3(rawOpenPayload: Uint8Array): Uint8Array;
|
|
91
|
+
export declare function encodeOpenACKV3(openHash: Uint8Array): Uint8Array;
|
|
92
|
+
export declare function decodeOpenACKV3(raw: Uint8Array): Uint8Array;
|
|
93
|
+
export declare function encodeOpenRejectV3(openHash: Uint8Array, reason: number): Uint8Array;
|
|
94
|
+
export declare function decodeOpenRejectV3(raw: Uint8Array): OpenRejectV3;
|
|
95
|
+
export declare function encodeStreamKeyUpdateACKV3(value: StreamKeyUpdateACKV3): Uint8Array;
|
|
96
|
+
export declare function decodeStreamKeyUpdateACKV3(raw: Uint8Array): StreamKeyUpdateACKV3;
|
|
97
|
+
export declare function buildRecordAAD(h3: Uint8Array, logicalStreamID: bigint, direction: DirectionV3, rawHeader: Uint8Array): Uint8Array;
|
|
98
|
+
export declare function sealRecord(suite: CipherSuiteV3, material: RecordMaterialV3, h3: Uint8Array, logicalStreamID: bigint, direction: DirectionV3, header: RecordHeaderV3, plaintext: Uint8Array): Uint8Array;
|
|
99
|
+
export declare function openRecord(suite: CipherSuiteV3, material: RecordMaterialV3, h3: Uint8Array, logicalStreamID: bigint, direction: DirectionV3, header: RecordHeaderV3, ciphertext: Uint8Array): Uint8Array;
|