@omnitronix/happy-panda-game-engine 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +732 -0
- package/dist/__tests__/bonus-sequence.test.d.ts +7 -0
- package/dist/__tests__/bonus-sequence.test.d.ts.map +1 -0
- package/dist/__tests__/bonus-sequence.test.js +381 -0
- package/dist/__tests__/bonus-sequence.test.js.map +1 -0
- package/dist/__tests__/cherry-frequency.test.d.ts +8 -0
- package/dist/__tests__/cherry-frequency.test.d.ts.map +1 -0
- package/dist/__tests__/cherry-frequency.test.js +128 -0
- package/dist/__tests__/cherry-frequency.test.js.map +1 -0
- package/dist/__tests__/comprehensive.test.d.ts +16 -0
- package/dist/__tests__/comprehensive.test.d.ts.map +1 -0
- package/dist/__tests__/comprehensive.test.js +491 -0
- package/dist/__tests__/comprehensive.test.js.map +1 -0
- package/dist/__tests__/counter-manager.test.d.ts +7 -0
- package/dist/__tests__/counter-manager.test.d.ts.map +1 -0
- package/dist/__tests__/counter-manager.test.js +317 -0
- package/dist/__tests__/counter-manager.test.js.map +1 -0
- package/dist/__tests__/coverage-boost.test.d.ts +13 -0
- package/dist/__tests__/coverage-boost.test.d.ts.map +1 -0
- package/dist/__tests__/coverage-boost.test.js +606 -0
- package/dist/__tests__/coverage-boost.test.js.map +1 -0
- package/dist/__tests__/cpp-parity.test.d.ts +39 -0
- package/dist/__tests__/cpp-parity.test.d.ts.map +1 -0
- package/dist/__tests__/cpp-parity.test.js +392 -0
- package/dist/__tests__/cpp-parity.test.js.map +1 -0
- package/dist/__tests__/debug-trigger-bonus.test.d.ts +8 -0
- package/dist/__tests__/debug-trigger-bonus.test.d.ts.map +1 -0
- package/dist/__tests__/debug-trigger-bonus.test.js +359 -0
- package/dist/__tests__/debug-trigger-bonus.test.js.map +1 -0
- package/dist/__tests__/fixtures/cpp-parity-vectors.json +457 -0
- package/dist/__tests__/gdd-validation-1000.test.d.ts +14 -0
- package/dist/__tests__/gdd-validation-1000.test.d.ts.map +1 -0
- package/dist/__tests__/gdd-validation-1000.test.js +418 -0
- package/dist/__tests__/gdd-validation-1000.test.js.map +1 -0
- package/dist/__tests__/happy-panda-engine.test.d.ts +7 -0
- package/dist/__tests__/happy-panda-engine.test.d.ts.map +1 -0
- package/dist/__tests__/happy-panda-engine.test.js +414 -0
- package/dist/__tests__/happy-panda-engine.test.js.map +1 -0
- package/dist/__tests__/jackpot-manager.test.d.ts +8 -0
- package/dist/__tests__/jackpot-manager.test.d.ts.map +1 -0
- package/dist/__tests__/jackpot-manager.test.js +313 -0
- package/dist/__tests__/jackpot-manager.test.js.map +1 -0
- package/dist/__tests__/jackpot-trigger-trace.test.d.ts +6 -0
- package/dist/__tests__/jackpot-trigger-trace.test.d.ts.map +1 -0
- package/dist/__tests__/jackpot-trigger-trace.test.js +146 -0
- package/dist/__tests__/jackpot-trigger-trace.test.js.map +1 -0
- package/dist/__tests__/rng-gli19-compliance.test.d.ts +21 -0
- package/dist/__tests__/rng-gli19-compliance.test.d.ts.map +1 -0
- package/dist/__tests__/rng-gli19-compliance.test.js +480 -0
- package/dist/__tests__/rng-gli19-compliance.test.js.map +1 -0
- package/dist/__tests__/rng-seed-security.test.d.ts +19 -0
- package/dist/__tests__/rng-seed-security.test.d.ts.map +1 -0
- package/dist/__tests__/rng-seed-security.test.js +518 -0
- package/dist/__tests__/rng-seed-security.test.js.map +1 -0
- package/dist/__tests__/rng-seed-type.test.d.ts +16 -0
- package/dist/__tests__/rng-seed-type.test.d.ts.map +1 -0
- package/dist/__tests__/rng-seed-type.test.js +285 -0
- package/dist/__tests__/rng-seed-type.test.js.map +1 -0
- package/dist/__tests__/rng-stress-boundary.test.d.ts +15 -0
- package/dist/__tests__/rng-stress-boundary.test.d.ts.map +1 -0
- package/dist/__tests__/rng-stress-boundary.test.js +590 -0
- package/dist/__tests__/rng-stress-boundary.test.js.map +1 -0
- package/dist/__tests__/rtp-1million.test.d.ts +8 -0
- package/dist/__tests__/rtp-1million.test.d.ts.map +1 -0
- package/dist/__tests__/rtp-1million.test.js +156 -0
- package/dist/__tests__/rtp-1million.test.js.map +1 -0
- package/dist/__tests__/rtp-analysis.test.d.ts +8 -0
- package/dist/__tests__/rtp-analysis.test.d.ts.map +1 -0
- package/dist/__tests__/rtp-analysis.test.js +138 -0
- package/dist/__tests__/rtp-analysis.test.js.map +1 -0
- package/dist/__tests__/rtp-diagnostic.test.d.ts +6 -0
- package/dist/__tests__/rtp-diagnostic.test.d.ts.map +1 -0
- package/dist/__tests__/rtp-diagnostic.test.js +141 -0
- package/dist/__tests__/rtp-diagnostic.test.js.map +1 -0
- package/dist/__tests__/rtp-simulation.test.d.ts +8 -0
- package/dist/__tests__/rtp-simulation.test.d.ts.map +1 -0
- package/dist/__tests__/rtp-simulation.test.js +411 -0
- package/dist/__tests__/rtp-simulation.test.js.map +1 -0
- package/dist/__tests__/special-wins.test.d.ts +7 -0
- package/dist/__tests__/special-wins.test.d.ts.map +1 -0
- package/dist/__tests__/special-wins.test.js +179 -0
- package/dist/__tests__/special-wins.test.js.map +1 -0
- package/dist/__tests__/spin-generator.test.d.ts +7 -0
- package/dist/__tests__/spin-generator.test.d.ts.map +1 -0
- package/dist/__tests__/spin-generator.test.js +297 -0
- package/dist/__tests__/spin-generator.test.js.map +1 -0
- package/dist/__tests__/spin-handler.test.d.ts +7 -0
- package/dist/__tests__/spin-handler.test.d.ts.map +1 -0
- package/dist/__tests__/spin-handler.test.js +210 -0
- package/dist/__tests__/spin-handler.test.js.map +1 -0
- package/dist/__tests__/symbol-distribution.test.d.ts +6 -0
- package/dist/__tests__/symbol-distribution.test.d.ts.map +1 -0
- package/dist/__tests__/symbol-distribution.test.js +119 -0
- package/dist/__tests__/symbol-distribution.test.js.map +1 -0
- package/dist/__tests__/test-protocol-10000-spin.test.d.ts +14 -0
- package/dist/__tests__/test-protocol-10000-spin.test.d.ts.map +1 -0
- package/dist/__tests__/test-protocol-10000-spin.test.js +359 -0
- package/dist/__tests__/test-protocol-10000-spin.test.js.map +1 -0
- package/dist/__tests__/weighted-random.test.d.ts +7 -0
- package/dist/__tests__/weighted-random.test.d.ts.map +1 -0
- package/dist/__tests__/weighted-random.test.js +165 -0
- package/dist/__tests__/weighted-random.test.js.map +1 -0
- package/dist/__tests__/win-evaluator.test.d.ts +7 -0
- package/dist/__tests__/win-evaluator.test.d.ts.map +1 -0
- package/dist/__tests__/win-evaluator.test.js +264 -0
- package/dist/__tests__/win-evaluator.test.js.map +1 -0
- package/dist/config/happy-panda.config.d.ts +217 -0
- package/dist/config/happy-panda.config.d.ts.map +1 -0
- package/dist/config/happy-panda.config.js +721 -0
- package/dist/config/happy-panda.config.js.map +1 -0
- package/dist/config/index.d.ts +5 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +21 -0
- package/dist/config/index.js.map +1 -0
- package/dist/debug/debug-command-definitions.d.ts +38 -0
- package/dist/debug/debug-command-definitions.d.ts.map +1 -0
- package/dist/debug/debug-command-definitions.js +80 -0
- package/dist/debug/debug-command-definitions.js.map +1 -0
- package/dist/domain/debug-trigger-bonus-command.d.ts +17 -0
- package/dist/domain/debug-trigger-bonus-command.d.ts.map +1 -0
- package/dist/domain/debug-trigger-bonus-command.js +3 -0
- package/dist/domain/debug-trigger-bonus-command.js.map +1 -0
- package/dist/domain/index.d.ts +5 -0
- package/dist/domain/index.d.ts.map +1 -0
- package/dist/domain/index.js +21 -0
- package/dist/domain/index.js.map +1 -0
- package/dist/domain/types.d.ts +228 -0
- package/dist/domain/types.d.ts.map +1 -0
- package/dist/domain/types.js +30 -0
- package/dist/domain/types.js.map +1 -0
- package/dist/engine/happy-panda-engine.d.ts +64 -0
- package/dist/engine/happy-panda-engine.d.ts.map +1 -0
- package/dist/engine/happy-panda-engine.js +324 -0
- package/dist/engine/happy-panda-engine.js.map +1 -0
- package/dist/engine/index.d.ts +5 -0
- package/dist/engine/index.d.ts.map +1 -0
- package/dist/engine/index.js +21 -0
- package/dist/engine/index.js.map +1 -0
- package/dist/game-engine.interface.d.ts +19 -0
- package/dist/game-engine.interface.d.ts.map +1 -0
- package/dist/game-engine.interface.js +9 -0
- package/dist/game-engine.interface.js.map +1 -0
- package/dist/happy-panda-v1.game-engine.d.ts +60 -0
- package/dist/happy-panda-v1.game-engine.d.ts.map +1 -0
- package/dist/happy-panda-v1.game-engine.js +524 -0
- package/dist/happy-panda-v1.game-engine.js.map +1 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +59 -0
- package/dist/index.js.map +1 -0
- package/dist/logic/handlers/index.d.ts +5 -0
- package/dist/logic/handlers/index.d.ts.map +1 -0
- package/dist/logic/handlers/index.js +21 -0
- package/dist/logic/handlers/index.js.map +1 -0
- package/dist/logic/handlers/spin-handler.d.ts +58 -0
- package/dist/logic/handlers/spin-handler.d.ts.map +1 -0
- package/dist/logic/handlers/spin-handler.js +265 -0
- package/dist/logic/handlers/spin-handler.js.map +1 -0
- package/dist/logic/index.d.ts +6 -0
- package/dist/logic/index.d.ts.map +1 -0
- package/dist/logic/index.js +22 -0
- package/dist/logic/index.js.map +1 -0
- package/dist/logic/services/counter-manager.d.ts +60 -0
- package/dist/logic/services/counter-manager.d.ts.map +1 -0
- package/dist/logic/services/counter-manager.js +268 -0
- package/dist/logic/services/counter-manager.js.map +1 -0
- package/dist/logic/services/index.d.ts +7 -0
- package/dist/logic/services/index.d.ts.map +1 -0
- package/dist/logic/services/index.js +23 -0
- package/dist/logic/services/index.js.map +1 -0
- package/dist/logic/services/jackpot-manager.d.ts +59 -0
- package/dist/logic/services/jackpot-manager.d.ts.map +1 -0
- package/dist/logic/services/jackpot-manager.js +142 -0
- package/dist/logic/services/jackpot-manager.js.map +1 -0
- package/dist/logic/services/win-evaluator.d.ts +51 -0
- package/dist/logic/services/win-evaluator.d.ts.map +1 -0
- package/dist/logic/services/win-evaluator.js +463 -0
- package/dist/logic/services/win-evaluator.js.map +1 -0
- package/dist/rng/dummy-rng-client.d.ts +39 -0
- package/dist/rng/dummy-rng-client.d.ts.map +1 -0
- package/dist/rng/dummy-rng-client.js +77 -0
- package/dist/rng/dummy-rng-client.js.map +1 -0
- package/dist/rng/index.d.ts +10 -0
- package/dist/rng/index.d.ts.map +1 -0
- package/dist/rng/index.js +27 -0
- package/dist/rng/index.js.map +1 -0
- package/dist/rng/rng-client.factory.d.ts +33 -0
- package/dist/rng/rng-client.factory.d.ts.map +1 -0
- package/dist/rng/rng-client.factory.js +57 -0
- package/dist/rng/rng-client.factory.js.map +1 -0
- package/dist/rng/rng-client.interface.d.ts +51 -0
- package/dist/rng/rng-client.interface.d.ts.map +1 -0
- package/dist/rng/rng-client.interface.js +9 -0
- package/dist/rng/rng-client.interface.js.map +1 -0
- package/dist/rng/rng-service.d.ts +93 -0
- package/dist/rng/rng-service.d.ts.map +1 -0
- package/dist/rng/rng-service.js +124 -0
- package/dist/rng/rng-service.js.map +1 -0
- package/dist/rng/spin-generator.d.ts +32 -0
- package/dist/rng/spin-generator.d.ts.map +1 -0
- package/dist/rng/spin-generator.js +338 -0
- package/dist/rng/spin-generator.js.map +1 -0
- package/dist/rng/weighted-random.d.ts +30 -0
- package/dist/rng/weighted-random.d.ts.map +1 -0
- package/dist/rng/weighted-random.js +58 -0
- package/dist/rng/weighted-random.js.map +1 -0
- package/package.json +59 -0
|
@@ -0,0 +1,518 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* RNG Seed Security Tests - Comprehensive Attack Vector Coverage
|
|
4
|
+
*
|
|
5
|
+
* This test suite covers:
|
|
6
|
+
* - Malformed seed injection attacks
|
|
7
|
+
* - Type confusion attacks
|
|
8
|
+
* - Integer overflow/underflow
|
|
9
|
+
* - Hash collision prevention
|
|
10
|
+
* - Replay attack vectors
|
|
11
|
+
* - Prototype pollution prevention
|
|
12
|
+
* - OWASP input validation
|
|
13
|
+
*
|
|
14
|
+
* GLI-19 Sections:
|
|
15
|
+
* - 3.4: Tamper-evident audit trails
|
|
16
|
+
* - 3.4.2: Tamper detection
|
|
17
|
+
* - 4.2.1: Deterministic replay
|
|
18
|
+
*/
|
|
19
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
+
const happy_panda_v1_game_engine_1 = require("../happy-panda-v1.game-engine");
|
|
21
|
+
const types_1 = require("../domain/types");
|
|
22
|
+
describe('RNG Seed Security - Attack Vector Tests', () => {
|
|
23
|
+
let engine;
|
|
24
|
+
beforeEach(() => {
|
|
25
|
+
engine = new happy_panda_v1_game_engine_1.HappyPandaV1GameEngine();
|
|
26
|
+
});
|
|
27
|
+
// Helper functions
|
|
28
|
+
async function initSession(betStake = 1) {
|
|
29
|
+
return engine.processCommand(null, null, {
|
|
30
|
+
id: 'init-security-test',
|
|
31
|
+
type: 'INIT_SESSION_STATE',
|
|
32
|
+
payload: {
|
|
33
|
+
gameDirection: types_1.GameDirection.SINGLE,
|
|
34
|
+
betStake,
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
async function executeSpin(publicState, privateState, commandId) {
|
|
39
|
+
return engine.processCommand(publicState, privateState, {
|
|
40
|
+
id: commandId || `spin-${Math.random().toString(36).slice(2)}`,
|
|
41
|
+
type: 'SPIN',
|
|
42
|
+
payload: { sessionId: 'security-test-session' },
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
function canonicalizeForHash(outcome) {
|
|
46
|
+
const entries = Object.entries(outcome)
|
|
47
|
+
.map(([actionId, record]) => ({
|
|
48
|
+
actionId,
|
|
49
|
+
result: Number(record.result),
|
|
50
|
+
seed: String(record.seed),
|
|
51
|
+
min: Number(record.min),
|
|
52
|
+
max: Number(record.max),
|
|
53
|
+
}))
|
|
54
|
+
.sort((a, b) => a.actionId.localeCompare(b.actionId));
|
|
55
|
+
return JSON.stringify(entries);
|
|
56
|
+
}
|
|
57
|
+
// ============================================================
|
|
58
|
+
// SECTION 1: MALFORMED SEED INJECTION ATTACKS
|
|
59
|
+
// ============================================================
|
|
60
|
+
describe('Malformed Seed Injection Attacks', () => {
|
|
61
|
+
describe('Unicode and special character attacks', () => {
|
|
62
|
+
it('should handle seeds with leading whitespace in canonicalization', () => {
|
|
63
|
+
const outcome = {
|
|
64
|
+
test_action: { result: 5, seed: ' 123', min: 0, max: 10 },
|
|
65
|
+
};
|
|
66
|
+
const canonical = canonicalizeForHash(outcome);
|
|
67
|
+
// String() will include the space, which is different from "123"
|
|
68
|
+
expect(canonical).toContain('"seed":" 123"');
|
|
69
|
+
});
|
|
70
|
+
it('should handle seeds with trailing whitespace in canonicalization', () => {
|
|
71
|
+
const outcome = {
|
|
72
|
+
test_action: { result: 5, seed: '123 ', min: 0, max: 10 },
|
|
73
|
+
};
|
|
74
|
+
const canonical = canonicalizeForHash(outcome);
|
|
75
|
+
expect(canonical).toContain('"seed":"123 "');
|
|
76
|
+
});
|
|
77
|
+
it('should produce different hashes for whitespace-padded seeds', () => {
|
|
78
|
+
const outcome1 = { test: { result: 5, seed: 123, min: 0, max: 10 } };
|
|
79
|
+
const outcome2 = { test: { result: 5, seed: ' 123', min: 0, max: 10 } };
|
|
80
|
+
const outcome3 = { test: { result: 5, seed: '123 ', min: 0, max: 10 } };
|
|
81
|
+
const hash1 = canonicalizeForHash(outcome1);
|
|
82
|
+
const hash2 = canonicalizeForHash(outcome2);
|
|
83
|
+
const hash3 = canonicalizeForHash(outcome3);
|
|
84
|
+
expect(hash1).not.toBe(hash2);
|
|
85
|
+
expect(hash1).not.toBe(hash3);
|
|
86
|
+
expect(hash2).not.toBe(hash3);
|
|
87
|
+
});
|
|
88
|
+
it('should handle zero-width unicode characters safely', () => {
|
|
89
|
+
// Zero-width space U+200B
|
|
90
|
+
const outcome = {
|
|
91
|
+
test_action: { result: 5, seed: '123\u200B456', min: 0, max: 10 },
|
|
92
|
+
};
|
|
93
|
+
const canonical = canonicalizeForHash(outcome);
|
|
94
|
+
// Should preserve the character (not silently strip it)
|
|
95
|
+
expect(canonical.length).toBeGreaterThan(0);
|
|
96
|
+
});
|
|
97
|
+
it('should handle full-width unicode digits differently from ASCII', () => {
|
|
98
|
+
// Fullwidth digits 123 (U+FF11, U+FF12, U+FF13)
|
|
99
|
+
const asciiOutcome = { test: { result: 5, seed: 123, min: 0, max: 10 } };
|
|
100
|
+
const unicodeOutcome = { test: { result: 5, seed: '\uFF11\uFF12\uFF13', min: 0, max: 10 } };
|
|
101
|
+
const asciiCanonical = canonicalizeForHash(asciiOutcome);
|
|
102
|
+
const unicodeCanonical = canonicalizeForHash(unicodeOutcome);
|
|
103
|
+
// Must be different - fullwidth digits should not equal ASCII
|
|
104
|
+
expect(asciiCanonical).not.toBe(unicodeCanonical);
|
|
105
|
+
});
|
|
106
|
+
it('should escape newlines in actionIds for JSON safety', () => {
|
|
107
|
+
const outcome = {
|
|
108
|
+
'action\nwith\nnewlines': { result: 5, seed: 123, min: 0, max: 10 },
|
|
109
|
+
};
|
|
110
|
+
const canonical = canonicalizeForHash(outcome);
|
|
111
|
+
// JSON.stringify should escape newlines
|
|
112
|
+
expect(canonical).not.toContain('\n');
|
|
113
|
+
expect(canonical).toContain('\\n');
|
|
114
|
+
});
|
|
115
|
+
it('should escape quotes in actionIds for JSON safety', () => {
|
|
116
|
+
const outcome = {
|
|
117
|
+
'action"with"quotes': { result: 5, seed: 123, min: 0, max: 10 },
|
|
118
|
+
};
|
|
119
|
+
const canonical = canonicalizeForHash(outcome);
|
|
120
|
+
// JSON.stringify should escape quotes
|
|
121
|
+
expect(canonical).toContain('\\"');
|
|
122
|
+
expect(() => JSON.parse(canonical)).not.toThrow();
|
|
123
|
+
});
|
|
124
|
+
it('should handle backslashes in actionIds', () => {
|
|
125
|
+
const outcome = {
|
|
126
|
+
'action\\with\\backslash': { result: 5, seed: 123, min: 0, max: 10 },
|
|
127
|
+
};
|
|
128
|
+
const canonical = canonicalizeForHash(outcome);
|
|
129
|
+
expect(() => JSON.parse(canonical)).not.toThrow();
|
|
130
|
+
});
|
|
131
|
+
});
|
|
132
|
+
describe('Numeric format attacks', () => {
|
|
133
|
+
it('should not interpret hexadecimal string seeds as numbers', () => {
|
|
134
|
+
const outcome = {
|
|
135
|
+
test: { result: 5, seed: '0xFF', min: 0, max: 10 },
|
|
136
|
+
};
|
|
137
|
+
const canonical = canonicalizeForHash(outcome);
|
|
138
|
+
// Should be literal "0xFF", not "255"
|
|
139
|
+
expect(canonical).toContain('"seed":"0xFF"');
|
|
140
|
+
});
|
|
141
|
+
it('should not interpret octal string seeds as numbers', () => {
|
|
142
|
+
const outcome = {
|
|
143
|
+
test: { result: 5, seed: '0777', min: 0, max: 10 },
|
|
144
|
+
};
|
|
145
|
+
const canonical = canonicalizeForHash(outcome);
|
|
146
|
+
// Should be literal "0777", not "511"
|
|
147
|
+
expect(canonical).toContain('"seed":"0777"');
|
|
148
|
+
});
|
|
149
|
+
it('should not interpret binary string seeds as numbers', () => {
|
|
150
|
+
const outcome = {
|
|
151
|
+
test: { result: 5, seed: '0b1010', min: 0, max: 10 },
|
|
152
|
+
};
|
|
153
|
+
const canonical = canonicalizeForHash(outcome);
|
|
154
|
+
expect(canonical).toContain('"seed":"0b1010"');
|
|
155
|
+
});
|
|
156
|
+
it('should handle plus sign prefix differently', () => {
|
|
157
|
+
const outcome1 = { test: { result: 5, seed: 123, min: 0, max: 10 } };
|
|
158
|
+
const outcome2 = { test: { result: 5, seed: '+123', min: 0, max: 10 } };
|
|
159
|
+
const hash1 = canonicalizeForHash(outcome1);
|
|
160
|
+
const hash2 = canonicalizeForHash(outcome2);
|
|
161
|
+
// String "+123" should be different from number 123 -> "123"
|
|
162
|
+
expect(hash1).not.toBe(hash2);
|
|
163
|
+
});
|
|
164
|
+
});
|
|
165
|
+
});
|
|
166
|
+
// ============================================================
|
|
167
|
+
// SECTION 2: TYPE CONFUSION ATTACKS
|
|
168
|
+
// ============================================================
|
|
169
|
+
describe('Type Confusion Attacks', () => {
|
|
170
|
+
it('should handle array seed values in canonicalization', () => {
|
|
171
|
+
const outcome = {
|
|
172
|
+
test: { result: 5, seed: [123], min: 0, max: 10 },
|
|
173
|
+
};
|
|
174
|
+
// String([123]) = "123" - could cause confusion
|
|
175
|
+
const canonical = canonicalizeForHash(outcome);
|
|
176
|
+
expect(canonical).toContain('"seed":"123"');
|
|
177
|
+
});
|
|
178
|
+
it('should handle nested array seed values', () => {
|
|
179
|
+
const outcome = {
|
|
180
|
+
test: { result: 5, seed: [[123]], min: 0, max: 10 },
|
|
181
|
+
};
|
|
182
|
+
// String([[123]]) = "123"
|
|
183
|
+
const canonical = canonicalizeForHash(outcome);
|
|
184
|
+
expect(canonical).toBeDefined();
|
|
185
|
+
});
|
|
186
|
+
it('should handle object seed values', () => {
|
|
187
|
+
const outcome = {
|
|
188
|
+
test: { result: 5, seed: { value: 123 }, min: 0, max: 10 },
|
|
189
|
+
};
|
|
190
|
+
// String({value: 123}) = "[object Object]"
|
|
191
|
+
const canonical = canonicalizeForHash(outcome);
|
|
192
|
+
expect(canonical).toContain('[object Object]');
|
|
193
|
+
});
|
|
194
|
+
it('should handle null seed values', () => {
|
|
195
|
+
const outcome = {
|
|
196
|
+
test: { result: 5, seed: null, min: 0, max: 10 },
|
|
197
|
+
};
|
|
198
|
+
// String(null) = "null"
|
|
199
|
+
const canonical = canonicalizeForHash(outcome);
|
|
200
|
+
expect(canonical).toContain('"seed":"null"');
|
|
201
|
+
});
|
|
202
|
+
it('should handle undefined seed values', () => {
|
|
203
|
+
const outcome = {
|
|
204
|
+
test: { result: 5, seed: undefined, min: 0, max: 10 },
|
|
205
|
+
};
|
|
206
|
+
// String(undefined) = "undefined"
|
|
207
|
+
const canonical = canonicalizeForHash(outcome);
|
|
208
|
+
expect(canonical).toContain('"seed":"undefined"');
|
|
209
|
+
});
|
|
210
|
+
it('should handle boolean true seed values', () => {
|
|
211
|
+
const outcome = {
|
|
212
|
+
test: { result: 5, seed: true, min: 0, max: 10 },
|
|
213
|
+
};
|
|
214
|
+
// String(true) = "true"
|
|
215
|
+
const canonical = canonicalizeForHash(outcome);
|
|
216
|
+
expect(canonical).toContain('"seed":"true"');
|
|
217
|
+
});
|
|
218
|
+
it('should handle boolean false seed values', () => {
|
|
219
|
+
const outcome = {
|
|
220
|
+
test: { result: 5, seed: false, min: 0, max: 10 },
|
|
221
|
+
};
|
|
222
|
+
// String(false) = "false"
|
|
223
|
+
const canonical = canonicalizeForHash(outcome);
|
|
224
|
+
expect(canonical).toContain('"seed":"false"');
|
|
225
|
+
});
|
|
226
|
+
it('should handle BigInt seed values', () => {
|
|
227
|
+
const outcome = {
|
|
228
|
+
test: { result: 5, seed: BigInt(123), min: 0, max: 10 },
|
|
229
|
+
};
|
|
230
|
+
// String(BigInt(123)) = "123"
|
|
231
|
+
const canonical = canonicalizeForHash(outcome);
|
|
232
|
+
expect(canonical).toContain('"seed":"123"');
|
|
233
|
+
});
|
|
234
|
+
it('should handle Symbol seed values safely', () => {
|
|
235
|
+
// In ES2015+, String(Symbol()) returns "Symbol(description)"
|
|
236
|
+
// This doesn't throw, but produces a string representation
|
|
237
|
+
const symbol = Symbol('test');
|
|
238
|
+
const asString = String(symbol);
|
|
239
|
+
expect(asString).toBe('Symbol(test)');
|
|
240
|
+
// When used in canonicalization, it becomes a string
|
|
241
|
+
const outcome = {
|
|
242
|
+
test: { result: 5, seed: symbol, min: 0, max: 10 },
|
|
243
|
+
};
|
|
244
|
+
const canonical = canonicalizeForHash(outcome);
|
|
245
|
+
expect(canonical).toContain('"seed":"Symbol(test)"');
|
|
246
|
+
});
|
|
247
|
+
it('should handle object with custom toString', () => {
|
|
248
|
+
const malicious = {
|
|
249
|
+
toString: () => '123',
|
|
250
|
+
valueOf: () => 456,
|
|
251
|
+
};
|
|
252
|
+
const outcome = {
|
|
253
|
+
test: { result: 5, seed: malicious, min: 0, max: 10 },
|
|
254
|
+
};
|
|
255
|
+
const canonical = canonicalizeForHash(outcome);
|
|
256
|
+
// String() uses toString()
|
|
257
|
+
expect(canonical).toContain('"seed":"123"');
|
|
258
|
+
});
|
|
259
|
+
it('should handle object with throwing toString', () => {
|
|
260
|
+
const malicious = {
|
|
261
|
+
toString: () => { throw new Error('attack'); },
|
|
262
|
+
};
|
|
263
|
+
const outcome = {
|
|
264
|
+
test: { result: 5, seed: malicious, min: 0, max: 10 },
|
|
265
|
+
};
|
|
266
|
+
expect(() => canonicalizeForHash(outcome)).toThrow();
|
|
267
|
+
});
|
|
268
|
+
});
|
|
269
|
+
// ============================================================
|
|
270
|
+
// SECTION 3: INTEGER OVERFLOW/UNDERFLOW
|
|
271
|
+
// ============================================================
|
|
272
|
+
describe('Integer Overflow/Underflow', () => {
|
|
273
|
+
it('should handle MAX_SAFE_INTEGER exactly', () => {
|
|
274
|
+
const outcome = {
|
|
275
|
+
test: { result: 5, seed: Number.MAX_SAFE_INTEGER, min: 0, max: 10 },
|
|
276
|
+
};
|
|
277
|
+
const canonical = canonicalizeForHash(outcome);
|
|
278
|
+
expect(canonical).toContain(`"seed":"${Number.MAX_SAFE_INTEGER}"`);
|
|
279
|
+
});
|
|
280
|
+
it('should handle MIN_SAFE_INTEGER exactly', () => {
|
|
281
|
+
const outcome = {
|
|
282
|
+
test: { result: 5, seed: Number.MIN_SAFE_INTEGER, min: -100, max: 100 },
|
|
283
|
+
};
|
|
284
|
+
const canonical = canonicalizeForHash(outcome);
|
|
285
|
+
expect(canonical).toContain(`"seed":"${Number.MIN_SAFE_INTEGER}"`);
|
|
286
|
+
});
|
|
287
|
+
it('should handle MAX_SAFE_INTEGER - 1', () => {
|
|
288
|
+
const value = Number.MAX_SAFE_INTEGER - 1;
|
|
289
|
+
const outcome = {
|
|
290
|
+
test: { result: 5, seed: value, min: 0, max: 10 },
|
|
291
|
+
};
|
|
292
|
+
const canonical = canonicalizeForHash(outcome);
|
|
293
|
+
expect(canonical).toContain(`"seed":"${value}"`);
|
|
294
|
+
});
|
|
295
|
+
it('should handle MIN_SAFE_INTEGER + 1', () => {
|
|
296
|
+
const value = Number.MIN_SAFE_INTEGER + 1;
|
|
297
|
+
const outcome = {
|
|
298
|
+
test: { result: 5, seed: value, min: -100, max: 100 },
|
|
299
|
+
};
|
|
300
|
+
const canonical = canonicalizeForHash(outcome);
|
|
301
|
+
expect(canonical).toContain(`"seed":"${value}"`);
|
|
302
|
+
});
|
|
303
|
+
it('should detect precision loss for unsafe integers', () => {
|
|
304
|
+
const unsafeValue = Number.MAX_SAFE_INTEGER + 1;
|
|
305
|
+
const asString = String(unsafeValue);
|
|
306
|
+
const restored = Number(asString);
|
|
307
|
+
// This demonstrates the precision loss issue
|
|
308
|
+
expect(restored).toBe(unsafeValue); // Actually passes because of how JS handles this
|
|
309
|
+
expect(Number.isSafeInteger(unsafeValue)).toBe(false);
|
|
310
|
+
});
|
|
311
|
+
it('should handle very large string seeds', () => {
|
|
312
|
+
const outcome = {
|
|
313
|
+
test: { result: 5, seed: '99999999999999999999', min: 0, max: 10 },
|
|
314
|
+
};
|
|
315
|
+
const canonical = canonicalizeForHash(outcome);
|
|
316
|
+
expect(canonical).toContain('"seed":"99999999999999999999"');
|
|
317
|
+
});
|
|
318
|
+
it('should handle NaN in result field', () => {
|
|
319
|
+
const outcome = {
|
|
320
|
+
test: { result: NaN, seed: 123, min: 0, max: 10 },
|
|
321
|
+
};
|
|
322
|
+
const canonical = canonicalizeForHash(outcome);
|
|
323
|
+
// Number(NaN) is NaN, JSON.stringify(NaN) is null
|
|
324
|
+
expect(canonical).toContain('"result":null');
|
|
325
|
+
});
|
|
326
|
+
it('should handle Infinity in result field', () => {
|
|
327
|
+
const outcome = {
|
|
328
|
+
test: { result: Infinity, seed: 123, min: 0, max: 10 },
|
|
329
|
+
};
|
|
330
|
+
const canonical = canonicalizeForHash(outcome);
|
|
331
|
+
expect(canonical).toContain('"result":null');
|
|
332
|
+
});
|
|
333
|
+
it('should handle -Infinity in min field', () => {
|
|
334
|
+
const outcome = {
|
|
335
|
+
test: { result: 5, seed: 123, min: -Infinity, max: 10 },
|
|
336
|
+
};
|
|
337
|
+
const canonical = canonicalizeForHash(outcome);
|
|
338
|
+
expect(canonical).toContain('"min":null');
|
|
339
|
+
});
|
|
340
|
+
});
|
|
341
|
+
// ============================================================
|
|
342
|
+
// SECTION 4: HASH COLLISION PREVENTION
|
|
343
|
+
// ============================================================
|
|
344
|
+
describe('Hash Collision Prevention', () => {
|
|
345
|
+
it('should produce different hashes for adjacent seeds', () => {
|
|
346
|
+
const outcome1 = { action: { result: 5, seed: 123, min: 0, max: 10 } };
|
|
347
|
+
const outcome2 = { action: { result: 5, seed: 124, min: 0, max: 10 } };
|
|
348
|
+
expect(canonicalizeForHash(outcome1)).not.toBe(canonicalizeForHash(outcome2));
|
|
349
|
+
});
|
|
350
|
+
it('should produce different hashes for different actionIds', () => {
|
|
351
|
+
const outcome1 = { action_a: { result: 5, seed: 123, min: 0, max: 10 } };
|
|
352
|
+
const outcome2 = { action_b: { result: 5, seed: 123, min: 0, max: 10 } };
|
|
353
|
+
expect(canonicalizeForHash(outcome1)).not.toBe(canonicalizeForHash(outcome2));
|
|
354
|
+
});
|
|
355
|
+
it('should produce different hashes when only result differs', () => {
|
|
356
|
+
const outcome1 = { action: { result: 5, seed: 123, min: 0, max: 10 } };
|
|
357
|
+
const outcome2 = { action: { result: 6, seed: 123, min: 0, max: 10 } };
|
|
358
|
+
expect(canonicalizeForHash(outcome1)).not.toBe(canonicalizeForHash(outcome2));
|
|
359
|
+
});
|
|
360
|
+
it('should produce different hashes when only min differs', () => {
|
|
361
|
+
const outcome1 = { action: { result: 5, seed: 123, min: 0, max: 10 } };
|
|
362
|
+
const outcome2 = { action: { result: 5, seed: 123, min: 1, max: 10 } };
|
|
363
|
+
expect(canonicalizeForHash(outcome1)).not.toBe(canonicalizeForHash(outcome2));
|
|
364
|
+
});
|
|
365
|
+
it('should produce different hashes when only max differs', () => {
|
|
366
|
+
const outcome1 = { action: { result: 5, seed: 123, min: 0, max: 10 } };
|
|
367
|
+
const outcome2 = { action: { result: 5, seed: 123, min: 0, max: 11 } };
|
|
368
|
+
expect(canonicalizeForHash(outcome1)).not.toBe(canonicalizeForHash(outcome2));
|
|
369
|
+
});
|
|
370
|
+
it('should not be vulnerable to actionId crafting for JSON injection', () => {
|
|
371
|
+
// Attempt to craft actionId to cause collision via JSON structure
|
|
372
|
+
const outcome1 = { 'a","seed":"999': { result: 5, seed: 123, min: 0, max: 10 } };
|
|
373
|
+
const outcome2 = { 'a': { result: 5, seed: 999, min: 0, max: 10 } };
|
|
374
|
+
const hash1 = canonicalizeForHash(outcome1);
|
|
375
|
+
const hash2 = canonicalizeForHash(outcome2);
|
|
376
|
+
expect(hash1).not.toBe(hash2);
|
|
377
|
+
expect(() => JSON.parse(hash1)).not.toThrow();
|
|
378
|
+
expect(() => JSON.parse(hash2)).not.toThrow();
|
|
379
|
+
});
|
|
380
|
+
it('should maintain hash uniqueness for number vs string representation', () => {
|
|
381
|
+
const outcome1 = { action: { result: 5, seed: 123, min: 0, max: 10 } };
|
|
382
|
+
const outcome2 = { action: { result: 5, seed: '123', min: 0, max: 10 } };
|
|
383
|
+
// After canonicalization, both should produce same hash (both become "123")
|
|
384
|
+
expect(canonicalizeForHash(outcome1)).toBe(canonicalizeForHash(outcome2));
|
|
385
|
+
});
|
|
386
|
+
});
|
|
387
|
+
// ============================================================
|
|
388
|
+
// SECTION 5: PROTOTYPE POLLUTION PREVENTION
|
|
389
|
+
// ============================================================
|
|
390
|
+
describe('Prototype Pollution Prevention', () => {
|
|
391
|
+
it('should handle __proto__ as actionId safely', () => {
|
|
392
|
+
// Note: Object.entries() does NOT enumerate __proto__ as it's not a regular property
|
|
393
|
+
// This is actually a safety feature - __proto__ is treated specially
|
|
394
|
+
const outcome = {
|
|
395
|
+
'normal_action': { result: 6, seed: 456, min: 0, max: 10 },
|
|
396
|
+
};
|
|
397
|
+
// Use Object.defineProperty to truly test __proto__ handling
|
|
398
|
+
Object.defineProperty(outcome, '__proto__custom', {
|
|
399
|
+
value: { result: 5, seed: 123, min: 0, max: 10 },
|
|
400
|
+
enumerable: true,
|
|
401
|
+
});
|
|
402
|
+
const canonical = canonicalizeForHash(outcome);
|
|
403
|
+
const parsed = JSON.parse(canonical);
|
|
404
|
+
// Should include both entries
|
|
405
|
+
expect(parsed.length).toBe(2);
|
|
406
|
+
// Verify prototype is not polluted
|
|
407
|
+
expect({}.__proto__.result).toBeUndefined();
|
|
408
|
+
});
|
|
409
|
+
it('should handle constructor as actionId safely', () => {
|
|
410
|
+
const outcome = {
|
|
411
|
+
'constructor': { result: 5, seed: 123, min: 0, max: 10 },
|
|
412
|
+
};
|
|
413
|
+
const canonical = canonicalizeForHash(outcome);
|
|
414
|
+
const parsed = JSON.parse(canonical);
|
|
415
|
+
expect(parsed[0].actionId).toBe('constructor');
|
|
416
|
+
});
|
|
417
|
+
it('should handle toString as actionId safely', () => {
|
|
418
|
+
const outcome = {
|
|
419
|
+
'toString': { result: 5, seed: 123, min: 0, max: 10 },
|
|
420
|
+
};
|
|
421
|
+
const canonical = canonicalizeForHash(outcome);
|
|
422
|
+
expect(() => JSON.parse(canonical)).not.toThrow();
|
|
423
|
+
});
|
|
424
|
+
it('should handle valueOf as actionId safely', () => {
|
|
425
|
+
const outcome = {
|
|
426
|
+
'valueOf': { result: 5, seed: 123, min: 0, max: 10 },
|
|
427
|
+
};
|
|
428
|
+
const canonical = canonicalizeForHash(outcome);
|
|
429
|
+
expect(() => JSON.parse(canonical)).not.toThrow();
|
|
430
|
+
});
|
|
431
|
+
});
|
|
432
|
+
// ============================================================
|
|
433
|
+
// SECTION 6: REPLAY ATTACK PREVENTION
|
|
434
|
+
// ============================================================
|
|
435
|
+
describe('Replay Attack Prevention', () => {
|
|
436
|
+
it('should produce different outcomes for repeated spins', async () => {
|
|
437
|
+
const init = await initSession();
|
|
438
|
+
const spin1 = await executeSpin(init.publicState, init.privateState, 'spin-1');
|
|
439
|
+
const spin2 = await executeSpin(spin1.publicState, spin1.privateState, 'spin-2');
|
|
440
|
+
// Different commands should have different outcomes
|
|
441
|
+
expect(spin1.rngOutcome).not.toEqual(spin2.rngOutcome);
|
|
442
|
+
});
|
|
443
|
+
it('should handle same command ID rejection or different outcome', async () => {
|
|
444
|
+
const init = await initSession();
|
|
445
|
+
const spin1 = await executeSpin(init.publicState, init.privateState, 'duplicate-id');
|
|
446
|
+
const spin2 = await executeSpin(spin1.publicState, spin1.privateState, 'duplicate-id');
|
|
447
|
+
// Either should reject duplicate ID or produce different outcome
|
|
448
|
+
// The exact behavior depends on implementation
|
|
449
|
+
expect(spin1.success).toBe(true);
|
|
450
|
+
expect(spin2.success).toBe(true);
|
|
451
|
+
});
|
|
452
|
+
it('should not allow state rollback', async () => {
|
|
453
|
+
const init = await initSession();
|
|
454
|
+
const spin1 = await executeSpin(init.publicState, init.privateState, 'spin-a');
|
|
455
|
+
const spin2 = await executeSpin(spin1.publicState, spin1.privateState, 'spin-b');
|
|
456
|
+
// Try to replay from spin1's state (rollback)
|
|
457
|
+
const rollback = await executeSpin(spin1.publicState, spin1.privateState, 'spin-c');
|
|
458
|
+
// Should produce different results or be rejected
|
|
459
|
+
expect(rollback.rngOutcome).not.toEqual(spin2.rngOutcome);
|
|
460
|
+
});
|
|
461
|
+
it('should verify seed entropy across many spins', async () => {
|
|
462
|
+
const seeds = new Set();
|
|
463
|
+
for (let i = 0; i < 100; i++) {
|
|
464
|
+
const init = await initSession();
|
|
465
|
+
const spin = await executeSpin(init.publicState, init.privateState);
|
|
466
|
+
if (spin.rngOutcome) {
|
|
467
|
+
for (const [actionId, record] of Object.entries(spin.rngOutcome)) {
|
|
468
|
+
seeds.add(`${actionId}:${record.seed}`);
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
// With 100 independent sessions, we should have reasonable diversity
|
|
473
|
+
// (DummyRngClient returns seed=0, so this tests the pattern, not actual entropy)
|
|
474
|
+
expect(seeds.size).toBeGreaterThan(0);
|
|
475
|
+
});
|
|
476
|
+
});
|
|
477
|
+
// ============================================================
|
|
478
|
+
// SECTION 7: ENGINE RNG OUTCOME VALIDATION
|
|
479
|
+
// ============================================================
|
|
480
|
+
describe('Engine RNG Outcome Validation', () => {
|
|
481
|
+
it('should always return rngOutcome on successful spin', async () => {
|
|
482
|
+
const init = await initSession();
|
|
483
|
+
const spin = await executeSpin(init.publicState, init.privateState);
|
|
484
|
+
expect(spin.success).toBe(true);
|
|
485
|
+
expect(spin.rngOutcome).toBeDefined();
|
|
486
|
+
expect(typeof spin.rngOutcome).toBe('object');
|
|
487
|
+
});
|
|
488
|
+
it('should have at least one RNG record per spin', async () => {
|
|
489
|
+
const init = await initSession();
|
|
490
|
+
const spin = await executeSpin(init.publicState, init.privateState);
|
|
491
|
+
expect(Object.keys(spin.rngOutcome).length).toBeGreaterThan(0);
|
|
492
|
+
});
|
|
493
|
+
it('should have valid result within min/max for all records', async () => {
|
|
494
|
+
const init = await initSession();
|
|
495
|
+
const spin = await executeSpin(init.publicState, init.privateState);
|
|
496
|
+
for (const [actionId, record] of Object.entries(spin.rngOutcome)) {
|
|
497
|
+
expect(record.result).toBeGreaterThanOrEqual(record.min);
|
|
498
|
+
expect(record.result).toBeLessThanOrEqual(record.max);
|
|
499
|
+
}
|
|
500
|
+
});
|
|
501
|
+
it('should have non-empty actionIds', async () => {
|
|
502
|
+
const init = await initSession();
|
|
503
|
+
const spin = await executeSpin(init.publicState, init.privateState);
|
|
504
|
+
for (const actionId of Object.keys(spin.rngOutcome)) {
|
|
505
|
+
expect(actionId.length).toBeGreaterThan(0);
|
|
506
|
+
expect(actionId.trim()).toBe(actionId); // No leading/trailing whitespace
|
|
507
|
+
}
|
|
508
|
+
});
|
|
509
|
+
it('should have unique actionIds within single spin', async () => {
|
|
510
|
+
const init = await initSession();
|
|
511
|
+
const spin = await executeSpin(init.publicState, init.privateState);
|
|
512
|
+
const actionIds = Object.keys(spin.rngOutcome);
|
|
513
|
+
const uniqueIds = new Set(actionIds);
|
|
514
|
+
expect(actionIds.length).toBe(uniqueIds.size);
|
|
515
|
+
});
|
|
516
|
+
});
|
|
517
|
+
});
|
|
518
|
+
//# sourceMappingURL=rng-seed-security.test.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,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,iCAAiC,EAAE,KAAK,IAAI,EAAE;YAC/C,MAAM,IAAI,GAAG,MAAM,WAAW,EAAE,CAAC;YACjC,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;YAEpE,KAAK,MAAM,QAAQ,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,UAAW,CAAC,EAAE,CAAC;gBACrD,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;gBAC3C,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,iCAAiC;YAC3E,CAAC;QACH,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,iDAAiD,EAAE,KAAK,IAAI,EAAE;YAC/D,MAAM,IAAI,GAAG,MAAM,WAAW,EAAE,CAAC;YACjC,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;YAEpE,MAAM,SAAS,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,UAAW,CAAC,CAAC;YAChD,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,SAAS,CAAC,CAAC;YAErC,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QAChD,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* RNG Seed Type Tests - GLI-19 Compliance Verification
|
|
3
|
+
*
|
|
4
|
+
* These tests verify that the RNG seed type fix is working correctly:
|
|
5
|
+
* 1. Seeds are returned as numbers (internal format)
|
|
6
|
+
* 2. Seeds can be safely converted to strings (wire format)
|
|
7
|
+
* 3. Hash canonicalization produces deterministic results
|
|
8
|
+
* 4. Edge cases are handled correctly
|
|
9
|
+
*
|
|
10
|
+
* GLI-19 Sections:
|
|
11
|
+
* - 3.4: Tamper-evident audit trails
|
|
12
|
+
* - 3.4.2: Tamper detection
|
|
13
|
+
* - 4.2.1: Deterministic replay
|
|
14
|
+
*/
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=rng-seed-type.test.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rng-seed-type.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/rng-seed-type.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG"}
|