-
-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathcontext.ai.json
2242 lines (2242 loc) · 83.8 KB
/
context.ai.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
[
{
"file": "./citadel_sdk/src/responses.rs",
"context": [
"Provides helper functions for protocol responses",
"Handles peer registration responses",
"Manages peer connection responses",
"Processes group invitation responses",
"Handles automatic ticket management",
"Manages connection type reversal",
"Performs username resolution and validation",
"Requires matching request tickets",
"Integrates with Remote interface",
"Supports PeerSignal and NodeResult handling"
]
},
{
"file": "./citadel_sdk/src/test_common.rs",
"context": [
"Provides testing utilities for Citadel Protocol",
"Supports test server creation and configuration",
"Implements synchronization barriers for multi-peer tests",
"Includes UDP mode testing utilities",
"Provides P2P connection testing helpers",
"Manages local test peer coordination",
"Requires localhost-testing feature for most functionality",
"Integrates with NodeBuilder for server configuration",
"Supports EmptyKernel for basic testing",
"Includes connection validation utilities"
]
},
{
"file": "./citadel_sdk/src/remote_ext.rs",
"context": [
"Extends NodeRemote with high-level protocol operations",
"Provides user registration and authentication",
"Manages connections and file transfers",
"Supports encrypted virtual filesystem",
"Handles peer discovery and group communication",
"Implements security settings configuration",
"Uses asynchronous operations throughout",
"Supports chunked file transfers for efficiency",
"Requires mutual registration for peer connections",
"Integrates with client-server and P2P modes"
]
},
{
"file": "./citadel_proto/src/inner_arg.rs",
"context": [
"Provides type-safe parameter reference handling",
"Implements wrapper types for mutable and immutable references",
"Uses zero-cost abstractions for performance",
"Enforces proper dereferencing behavior",
"Preserves mutability constraints",
"Integrates with packet processing and validation",
"Supports cryptographic operation safety"
]
},
{
"file": "./citadel_proto/src/functional.rs",
"context": [
"Provides functional programming utilities and extensions",
"Implements monadic-style operations and conditional chaining",
"Supports method chaining with Then trait",
"Provides conditional branching with IfEq and IfTrue",
"Implements tuple mapping with PairMap",
"Uses zero-cost abstractions and lazy evaluation",
"Enhances code readability throughout the codebase"
]
},
{
"file": "./citadel_proto/src/constants.rs",
"context": [
"Defines core protocol constants and configuration",
"Manages protocol version using semantic versioning",
"Specifies network parameters and MTU sizes",
"Controls timing intervals and timeouts",
"Sets buffer sizes and group limitations",
"Configures security level update frequencies",
"Defines port ranges and networking defaults"
]
},
{
"file": "./citadel_proto/src/auth.rs",
"context": [
"Defines authentication request types for Citadel Protocol",
"Supports both credential-based and passwordless authentication",
"Uses SecBuffer for secure credential handling",
"Manages user identification through CID and usernames",
"Handles server connection information for authentication",
"Implements transient device-based connections"
]
},
{
"file": "./citadel_proto/src/proto/validation.rs",
"context": [
"Core packet validation module for the Citadel Protocol",
"Implements security-critical validation for all packet types",
"Handles connection, registration, group, and file transfer validation",
"Uses AEAD cryptography for packet integrity verification",
"Implements zero-copy validation where possible",
"Contains submodules for different validation contexts: do_connect, group, do_register, do_entropy_bank_update, pre_connect, file, and aead",
"Maintains protocol state consistency across all validation steps"
]
},
{
"file": "./citadel_proto/src/proto/session.rs",
"context": [
"Core session management implementation for Citadel Protocol",
"Handles active connections between peers with state management",
"Implements secure file transfer with configurable security levels",
"Supports UDP connectivity for performance-critical operations",
"Provides clean shutdown and resource cleanup mechanisms",
"Handles connection interruptions and session resumption",
"Uses post-quantum cryptographic primitives for session security",
"Manages packet processing and stream handling",
"Implements session initialization and parameter configuration",
"Supports both TCP and UDP transport protocols",
"Handles authentication and credential management",
"Provides virtual connection management for different transfer types"
]
},
{
"file": "./citadel_proto/src/proto/session_queue_handler.rs",
"context": [
"Implements queue-based task scheduling for protocol sessions",
"Uses DelayQueue for managing timed operations",
"Handles both reserved system tasks (indices 0-9) and ordinary tasks (10+)",
"Supports one-shot tasks for single-execution operations",
"Integrates with session state management",
"Implements Stream and Future traits for async operation",
"Provides thread-safe task scheduling through atomic operations",
"Manages session shutdown and cleanup"
]
},
{
"file": "./citadel_proto/src/proto/packet.rs",
"context": [
"Implements the core Hypernode Data Protocol (HDP) packet structure",
"Defines packet headers, commands, and buffer handling",
"Provides zero-copy header parsing for efficiency",
"Manages packet composition and decomposition",
"Supports both BytesMut and Vec<u8> buffer types",
"Handles socket address tracking and packet routing",
"Implements hierarchical command organization"
]
},
{
"file": "./citadel_proto/src/proto/packet_processor/mod.rs",
"context": [
"Core packet processing infrastructure for the Citadel Protocol",
"Key aspects:",
"- Manages multiple packet types (connection, auth, data)",
"- Implements processing pipeline with validation",
"- Handles packet security and integrity",
"- Provides backpressure and ordering guarantees",
"- Coordinates between different packet processors"
]
},
{
"file": "./citadel_proto/src/proto/packet_processor/connect_packet.rs",
"context": [
"Handles connection establishment in Citadel Protocol",
"Key aspects:",
"- Implements secure multi-stage handshake",
"- Manages post-quantum key exchange",
"- Handles version and capability negotiation",
"- Provides connection state management",
"- Supports transport-agnostic connections"
]
},
{
"file": "./citadel_proto/src/proto/packet_processor/disconnect_packet.rs",
"context": [
"Implements graceful disconnection protocol",
"Uses two-stage disconnect handshake",
"Manages secure packet validation",
"Handles session state transitions",
"Coordinates with kernel for disconnect signals",
"Implements packet delivery delay for reliability",
"Tracks disconnection tickets"
]
},
{
"file": "./citadel_proto/src/proto/packet_processor/file_packet.rs",
"context": [
"Handles secure file transfer operations",
"Manages file transfer lifecycle",
"Supports chunked transfers",
"Integrates with virtual filesystem",
"Implements transfer state tracking",
"Handles both direct and proxied transfers"
]
},
{
"file": "./citadel_proto/src/proto/packet_processor/keep_alive_packet.rs",
"context": [
"Implements connection maintenance through keep-alive packets",
"Key aspects:",
"- Manages periodic heartbeat packets",
"- Detects connection liveness",
"- Monitors connection quality",
"- Handles connection timeouts",
"- Triggers automatic reconnection"
]
},
{
"file": "./citadel_proto/src/proto/packet_processor/deregister_packet.rs",
"context": [
"Handles client deregistration process",
"Manages secure account removal",
"Implements resource cleanup",
"Validates session state",
"Provides ticket-based tracking",
"Handles success/failure states",
"Manages client and server cleanup",
"Maintains security during removal",
"Integrates with account management",
"Reports deregistration results"
]
},
{
"file": "./citadel_proto/src/proto/packet_processor/raw_primary_packet.rs",
"context": [
"Low-level packet processing for primary data packets",
"Key aspects:",
"- Handles raw packet operations",
"- Manages packet headers and payloads",
"- Implements zero-copy processing",
"- Ensures packet integrity",
"- Validates packet structure"
]
},
{
"file": "./citadel_proto/src/proto/packet_processor/hole_punch.rs",
"context": [
"Implements NAT traversal through hole punching",
"Enables direct P2P connections behind NATs",
"Handles NAT traversal packet processing",
"Provides secure packet validation",
"Manages peer connection coordination",
"Implements connection pipe management",
"Supports proxied connections",
"Manages hole puncher pipes",
"Integrates with proxy system",
"Ensures authenticated packet handling"
]
},
{
"file": "./citadel_proto/src/proto/packet_processor/register_packet.rs",
"context": [
"Handles client registration in Citadel Protocol",
"Implements secure multi-stage handshake",
"Provides passwordless registration support",
"Manages session state transitions",
"Implements cryptographic parameter negotiation",
"Handles registration failure cases",
"Supports post-quantum cryptography",
"Validates registration parameters",
"Integrates with account management",
"Manages initial cryptographic setup"
]
},
{
"file": "./citadel_proto/src/proto/packet_processor/rekey_packet.rs",
"context": [
"Implements secure key rotation mechanism",
"Manages cryptographic key updates",
"Provides multi-stage key exchange",
"Implements post-quantum cryptography",
"Ensures perfect forward secrecy",
"Handles state synchronization",
"Supports proxy connections",
"Manages ratchet state updates",
"Handles key truncation operations",
"Integrates with security level system"
]
},
{
"file": "./citadel_proto/src/proto/session_manager.rs",
"context": [
"Core session management system for Citadel Protocol",
"Handles stateful connections between peers",
"Manages both provisional and established connections",
"Implements secure peer-to-peer communication",
"Provides group broadcast functionality",
"Supports configurable security levels",
"Handles virtual connection management",
"Implements clean shutdown procedures",
"Manages connection upgrades and transitions",
"Integrates with HyperNodePeerLayer for P2P operations"
]
},
{
"file": "./citadel_user/src/lib.rs",
"context": [
"Core user management system",
"Manages HyperVPN architecture",
"Provides hierarchical account structure",
"Handles authentication and security",
"Supports multiple backend storage",
"Integrates external services",
"Manages account lifecycle",
"Implements zero-trust architecture",
"Supports post-quantum cryptography",
"Provides feature-gated functionality"
]
},
{
"file": "./citadel_user/src/external_services/service_interface.rs",
"context": [
"Defines external service interface",
"Provides unified service communication",
"Supports async data transmission",
"Handles raw packet data",
"Enables peer-to-peer communication",
"Standardizes error handling",
"Ensures thread safety",
"Manages service connections",
"Implements common service trait",
"Supports multiple service types"
]
},
{
"file": "./citadel_user/src/external_services/rtdb.rs",
"context": [
"Provides Firebase RTDB integration",
"Manages real-time data synchronization",
"Handles authentication and tokens",
"Manages connection lifecycle",
"Implements data transfer interface",
"Supports connection refresh",
"Handles token expiration",
"Provides client configuration",
"Manages RTDB instances",
"Implements efficient data sync"
]
},
{
"file": "./citadel_user/src/external_services/mod.rs",
"context": [
"Manages external service integration",
"Provides Google services support",
"Handles service configuration",
"Manages service authentication",
"Supports Firebase RTDB",
"Handles JWT management",
"Provides WASM compatibility",
"Manages service state",
"Handles post-login services",
"Supports feature flags"
]
},
{
"file": "./citadel_user/src/auth/proposed_credentials.rs",
"context": [
"Manages credential proposals",
"Handles password hashing",
"Validates credentials",
"Supports passwordless auth",
"Implements username sanitization",
"Provides secure password storage",
"Manages authentication modes",
"Handles server validation",
"Implements credential comparison",
"Ensures memory safety"
]
},
{
"file": "./citadel_user/src/backend/sql_backend.rs",
"context": [
"Provides SQL database storage",
"Supports multiple SQL variants",
"Implements connection pooling",
"Handles SQL syntax differences",
"Manages schema creation",
"Supports blob and text storage",
"Implements atomic operations",
"Manages peer relationships",
"Provides efficient querying",
"Enables ACID compliance"
]
},
{
"file": "./citadel_user/src/backend/redis_backend.rs",
"context": [
"Provides distributed Redis storage",
"Implements connection pooling",
"Supports Redis clustering",
"Manages connection health checks",
"Handles connection timeouts",
"Provides automatic reconnection",
"Supports atomic operations",
"Manages peer relationships",
"Implements byte map storage",
"Enables high availability"
]
},
{
"file": "./citadel_user/src/backend/filesystem_backend.rs",
"context": [
"Provides filesystem-based persistent storage",
"Implements hybrid storage with memory cache",
"Manages client network account persistence",
"Handles directory structure organization",
"Supports peer relationship storage",
"Implements virtual filesystem operations",
"Provides byte map storage functionality",
"Ensures atomic file operations",
"Supports personal and impersonal accounts",
"Integrates with memory backend for caching"
]
},
{
"file": "./citadel_user/src/backend/memory.rs",
"context": [
"Provides in-memory backend storage",
"Implements thread-safe client storage",
"Manages peer relationships",
"Handles metadata operations",
"Supports byte map storage",
"Implements atomic operations",
"Manages resource cleanup",
"Supports WASM environments",
"Provides client registration",
"Maintains data consistency"
]
},
{
"file": "./citadel_user/src/backend/utils/mod.rs",
"context": [
"Manages object transfer operations",
"Implements bidirectional transfers",
"Provides progress tracking",
"Handles transfer status updates",
"Implements stream-based transfers",
"Manages transfer control flow",
"Provides async transfer support",
"Handles resource cleanup",
"Implements transfer acceptance",
"Manages transfer orientation"
]
},
{
"file": "./citadel_user/src/backend/mod.rs",
"context": [
"Defines core backend storage infrastructure",
"Manages multiple storage backend types",
"Implements unified backend interface",
"Provides async persistence operations",
"Handles database connections",
"Manages virtual filesystem operations",
"Implements thread-safe storage",
"Provides transaction management",
"Supports multiple database types",
"Handles automatic reconnection"
]
},
{
"file": "./citadel_user/src/auth/mod.rs",
"context": [
"Manages authentication modes for CNACs",
"Implements Argon2id password hashing",
"Supports passwordless authentication",
"Handles username uniqueness",
"Manages full name storage",
"Provides authentication state checks",
"Implements serializable auth data",
"Handles credential validation",
"Manages authentication modes",
"Provides secure data storage"
]
},
{
"file": "./citadel_user/src/account_loader.rs",
"context": [
"Manages loading of serialized client network accounts",
"Handles both personal and impersonal account types",
"Provides generic file loading capabilities",
"Implements efficient buffered I/O operations",
"Supports extensible deserialization",
"Manages filesystem-based account storage",
"Handles account loading errors gracefully",
"Integrates with directory management",
"Supports cryptographic account security",
"Provides account persistence functionality"
]
},
{
"file": "./citadel_user/src/server_misc_settings.rs",
"context": [
"Manages server-side configuration settings",
"Controls passwordless authentication",
"Enforces credential requirements",
"Provides default security settings",
"Integrates with account management",
"Supports customizable authentication flows",
"Handles server-side security policies",
"Configures node authentication behavior",
"Manages credential validation rules",
"Controls server security features"
]
},
{
"file": "./citadel_user/src/serialization.rs",
"context": [
"Provides binary serialization functionality",
"Implements efficient buffer operations",
"Supports in-place deserialization",
"Handles size estimation and pre-allocation",
"Uses bincode for binary encoding",
"Integrates with bytes buffer system",
"Provides trait-based serialization",
"Manages memory-efficient operations",
"Supports slice-based serialization",
"Implements error handling with AccountError"
]
},
{
"file": "./citadel_user/src/connection_metadata.rs",
"context": [
"Manages connection metadata for client connections",
"Handles connection protocol specifications",
"Supports TCP, TLS, and QUIC protocols",
"Stores socket address information",
"Provides domain name handling",
"Implements serialization support",
"Manages connection state persistence",
"Supports connection info display",
"Handles protocol-specific settings",
"Maintains connection type information"
]
},
{
"file": "./citadel_user/src/directory_store.rs",
"context": [
"Manages filesystem structure for Citadel Protocol",
"Handles directory creation and organization",
"Provides cross-platform path management",
"Organizes account storage directories",
"Manages configuration file locations",
"Supports virtual filesystem structure",
"Handles file transfer storage",
"Implements path formatting and generation",
"Maintains directory hierarchy",
"Ensures consistent file organization"
]
},
{
"file": "./citadel_user/src/credentials.rs",
"context": [
"Manages credential validation and requirements",
"Defines username and password constraints",
"Enforces length and format restrictions",
"Provides configurable validation rules",
"Handles full name format validation",
"Implements default security policies",
"Supports custom requirement definitions",
"Ensures consistent credential formats",
"Validates credential formatting",
"Defines system-wide credential limits"
]
},
{
"file": "./citadel_user/src/hypernode_account.rs",
"context": [
"Core HyperNode account functionality",
"Provides user identification extensions",
"Handles account search operations",
"Manages peer relationship lookups",
"Supports CID and username-based identification",
"Implements async account operations",
"Defines serialization file extension",
"Enables flexible account type extensions",
"Maintains bi-directional peer relationships",
"Integrates with persistence backends"
]
},
{
"file": "./citadel_user/src/account_manager.rs",
"context": [
"Central user account management system",
"Handles account creation and registration",
"Supports multiple storage backends (Memory, File, SQL, Redis)",
"Manages HyperLAN peer relationships",
"Provides secure credential storage",
"Implements Argon2id password hashing",
"Supports personal and impersonal modes",
"Handles P2P connection registration",
"Provides thread-safe async operations",
"Manages external service integrations"
]
},
{
"file": "./citadel_user/src/client_account.rs",
"context": [
"Manages individual client connections in Citadel Protocol",
"Handles both personal and impersonal connection modes",
"Implements secure credential management and validation",
"Provides ratchet-based cryptographic state management",
"Manages HyperLAN and HyperWAN peer relationships",
"Supports thread-safe operations through RwLock",
"Handles connection endpoint configuration",
"Implements peer list synchronization",
"Provides P2P connection support",
"Maintains immutable critical security fields"
]
},
{
"file": "./citadel_crypt/src/argon/autotuner.rs",
"context": [
"Automatic parameter tuning for Argon2 password hashing",
"Implements ORY's guidelines for parameter selection",
"Uses memory-first tuning strategy for optimal security",
"Dynamically adjusts based on system capabilities",
"Supports multi-threading with CPU core detection",
"Provides configurable minimum execution time",
"Includes safeguards for memory usage",
"Implements iterative parameter optimization",
"Supports custom hash lengths and secret keys",
"Designed for release-mode performance tuning"
]
},
{
"file": "./citadel_crypt/src/lib.rs",
"context": [
"Core cryptographic framework for the Citadel Protocol",
"Implements post-quantum cryptography and perfect forward secrecy",
"Provides secure memory management with zero-copy operations",
"Features entropy banking system for key derivation",
"Includes packet vectorization and port scrambling",
"Implements FCM (Forward Chain Messaging) primitives",
"Integrates Argon2 with auto-tuning capabilities",
"All operations are thread-safe and memory-efficient",
"Uses defense-in-depth with multiple security layers",
"Automatic memory zeroing for sensitive data"
]
},
{
"file": "./citadel_wire/src/lib.rs",
"context": [
"Main entry point for Citadel Wire crate",
"Provides secure peer-to-peer connection capabilities",
"Implements NAT traversal and UDP hole punching",
"Enforces zero unsafe code policy",
"Uses async-first design with security focus"
]
},
{
"file": "./async_ip/src/lib.rs",
"context": [
"Utility crate for asynchronous IP address resolution",
"Provides both IPv4 and IPv6 resolution with fallback mechanisms",
"Supports internal and external IP detection",
"Uses multiple services concurrently for reliability",
"Has special handling for WebAssembly environments",
"Key component for NAT traversal and network identification",
"Uses HTTP-based IP resolution services with configurable endpoints",
"Implements custom error handling for network and parsing failures"
]
},
{
"file": "./firebase-rtdb/src/lib.rs",
"context": [
"Lightweight async Rust client for Firebase Realtime Database",
"Provides JWT-based authentication with automatic token renewal",
"Implements all CRUD operations with JSON serialization",
"Uses hierarchical node-based database access",
"Handles connection timeouts and TLS security",
"Provides error handling for network and database operations",
"Supports connection pooling and TCP nodelay for performance",
"Implements Firebase Security Rules compatibility",
"Uses reqwest for HTTP communication with async support",
"Manages authentication state and token expiration"
]
},
{
"file": "./firebase-rtdb/Cargo.toml",
"context": [
"Package configuration for Firebase RTDB client",
"Uses workspace-level dependency management",
"Configures reqwest with rustls-tls for secure communication",
"Includes serde for JSON serialization support",
"Defines crate metadata and documentation links",
"Specifies test dependencies for integration testing"
]
},
{
"file": "./firebase-rtdb/tests/primary.rs",
"context": [
"Integration test file for Firebase RTDB client",
"Currently empty, prepared for future test implementations"
]
},
{
"file": "./netbeam/src/lib.rs",
"context": [
"Core library for high-performance networking with multiplexing support",
"Provides reliable ordered message delivery guarantees",
"Implements network-aware synchronization primitives",
"Uses zero unsafe code and leverages Rust's type system",
"Requires Tokio runtime for async operations",
"Supports both client and server modes with bi-directional communication",
"Includes time tracking utilities for network operations",
"Features proper error handling and type-safe APIs"
]
},
{
"file": "./netbeam/src/reliable_conn.rs",
"context": [
"Core traits for reliable network connections",
"Implements ordered message delivery guarantees",
"Supports both direct and NAT-traversed connections",
"Provides connection addressing abstraction",
"Includes serialization support for messages",
"Implements network simulation for testing"
]
},
{
"file": "./netbeam/src/multiplex.rs",
"context": [
"Network stream multiplexing implementation",
"Enables multiple logical connections over single physical connection",
"Provides bi-directional communication channels",
"Implements automatic stream ID generation and management",
"Ensures thread-safe subscription handling",
"Supports custom connection key types",
"Maintains message ordering within streams",
"Handles graceful stream initialization and cleanup",
"Uses pre-action and post-action hooks for lifecycle management",
"Provides both borrowed and owned subscription types"
]
},
{
"file": "./netbeam/src/time_tracker.rs",
"context": [
"Provides precise timing utilities for network operations",
"Uses monotonic system time for consistency",
"Implements nanosecond precision timing",
"Handles time overflow protection",
"Used for latency measurements and timing-sensitive operations"
]
},
{
"file": "./citadel_types/src/lib.rs",
"context": [
"Core type definitions for the Citadel Protocol",
"Provides fundamental data structures and utilities",
"Includes cryptographic types and parameters",
"Defines protocol-specific message types",
"Contains user-related data structures",
"Implements error handling and validation",
"Exports commonly used types through prelude"
]
},
{
"file": "./citadel_types/src/crypto/mod.rs",
"context": [
"Defines cryptographic types and parameters",
"Implements secure memory management with SecBuffer",
"Provides algorithm selection and configuration",
"Supports post-quantum cryptography algorithms",
"Includes security level specifications",
"Implements secure memory locking and zeroing",
"Provides serialization for cryptographic types",
"Supports various secrecy modes for different use cases"
]
},
{
"file": "./citadel_logging/src/lib.rs",
"context": [
"Structured logging facade for the Citadel Protocol",
"Built on top of the tracing ecosystem",
"Provides consistent logging setup across components",
"Supports file and line number information",
"Implements environment-based log level filtering",
"Includes panic handling with logging",
"Supports async-aware instrumentation",
"Uses span-based structured logging",
"Provides multiple log levels with target-based filtering"
]
},
{
"file": "./citadel_io/src/lib.rs",
"context": [
"Cross-platform I/O utility crate for native and WebAssembly targets",
"Provides consistent interfaces for synchronization primitives",
"Implements platform-specific random number generation",
"Abstracts async runtime differences between native and WASM",
"Re-exports Tokio ecosystem with platform-specific implementations",
"Supports deadlock detection on native platforms"
]
},
{
"file": "./citadel_io/src/standard/locks.rs",
"context": [
"Native platform synchronization primitives using parking_lot",
"High-performance mutex and read-write lock implementations",
"RAII-style lock guards for automatic resource management",
"More efficient than standard library synchronization types"
]
},
{
"file": "./citadel_io/src/wasm/locks.rs",
"context": [
"WebAssembly-compatible synchronization primitives",
"Wraps standard library locks for WASM compatibility",
"Maintains API compatibility with native code",
"Single-threaded implementation for current WASM limitations"
]
},
{
"file": "./citadel_io/src/wasm/rng.rs",
"context": [
"WebAssembly-compatible random number generation",
"Uses Web Crypto API through getrandom crate",
"Provides cryptographically secure random numbers",
"Implements RngCore and CryptoRng traits",
"Supports both fixed-size and dynamic buffer generation"
]
},
{
"file": "./citadel_pqcrypto/src/lib.rs",
"context": [
"# Documentation Progress",
"## citadel_pqcrypto Crate",
"### Completed Documentation",
"- `lib.rs`: Crate-level documentation with overview, features, and examples",
"- `constructor_opts.rs`: Documentation for `ConstructorOpts` struct",
"- Enhanced `RecursiveChain` documentation with examples and security considerations",
"- `encryption.rs`: Module-level documentation",
"- `AeadModule` trait documentation",
"- `AesModule` implementation docs",
"- `ChaChaModule` implementation docs",
"- `AsconModule` implementation docs",
"- `KyberModule` implementation docs with quantum security considerations",
"- `export.rs`: Enhanced module-level documentation",
"- Key store serialization documentation",
"- Security considerations for key material",
"- Examples for serialization/deserialization",
"- `bytes_in_place.rs`: Comprehensive module documentation",
"- `InPlaceBuffer` and `EzBuffer` documentation",
"- Examples for buffer operations",
"- `wire.rs`: Module-level documentation",
"- Parameter transfer documentation",
"- Scrambling dictionary documentation",
"- `replay_attack_container.rs`: Module-level documentation",
"- Anti-replay attack mechanism documentation",
"- Examples and security considerations",
"### Security Considerations Documented",
"- Post-quantum cryptography principles",
"- Proper nonce handling",
"- Zeroization of sensitive data",
"- Constant-time operations",
"- Forward secrecy",
"- Local-user encryption for endpoint privacy",
"- Anti-replay attack protections",
"- Key material serialization safety",
"- Buffer operation safety",
"- Parameter transfer security",
"### Next Steps",
"1. Review remaining files in citadel_pqcrypto for any documentation gaps",
"2. Cross-reference documentation between related components",
"3. Ensure all security considerations are thoroughly documented",
"4. Add more real-world usage examples",
"### Code Style and Standards",
"- All documentation follows Rust documentation best practices",
"- Examples are provided for key functionality",
"- Security considerations are clearly outlined",
"- Cross-references between related components are maintained"
]
},
{
"file": "./citadel_pqcrypto/src/constructor_opts.rs",
"context": [
"Provides configuration options for post-quantum cryptography (PQC) instances",
"Includes ConstructorOpts for PQC initialization and RecursiveChain for key derivation",
"Focuses on secure parameter handling and memory safety",
"Supports both initial and chained cryptographic operations"
]
},
{
"file": "./citadel_pqcrypto/src/bytes_in_place.rs",
"context": [
"Implements memory-efficient and secure in-place buffer operations",
"Features window-based buffer access control for safe data manipulation",
"Supports both Vec<u8> and BytesMut buffer types",
"Emphasizes zero-copy operations and memory safety"
]
},
{
"file": "./citadel_pqcrypto/src/wire.rs",
"context": [
"Implements secure wire protocol for PQC parameter transfer",
"Provides parameter transfer structures for Alice-Bob key exchange",
"Features data scrambling for additional security",
"Supports both symmetric and asymmetric encryption modes",
"Ensures memory safety and automatic parameter cleanup"
]
},
{
"file": "./citadel_pqcrypto/src/replay_attack_container.rs",
"context": [
"Implements protection against replay attacks in communications",
"Uses circular buffer for efficient PID history tracking",
"Supports out-of-order packet delivery within configurable window",
"Provides thread-safe PID generation and validation",
"Features automatic state reset on re-keying"
]
},
{
"file": "./citadel_wire/src/hypernode_type.rs",
"context": [
"This module defines network node types and their behaviors in the Citadel Protocol. It handles configuration for server nodes with static IPs and peer nodes in residential NAT environments, including automatic UPnP handling and NAT traversal fallback mechanisms"
]
},
{
"file": "./citadel_wire/src/error.rs",
"context": [
"This module implements error types specific to network traversal and firewall operations",
"It provides custom error types for UPnP and hole punching operations, with conversion traits to standard IO errors",
"The error types help categorize and handle various network-related failure scenarios, including port mapping failures and exhausted hole punching attempts"
]
},
{
"file": "./citadel_wire/src/standard/nat_identification.rs",
"context": [
"Provides NAT type identification and analysis",
"Uses STUN servers for NAT behavior detection",
"Analyzes port and IP translation patterns",
"Supports IPv4 and IPv6 compatibility checks",
"Determines optimal NAT traversal strategies"
]
},
{
"file": "./citadel_wire/src/standard/socket_helpers.rs",
"context": [
"Provides socket creation and configuration utilities",
"Handles TCP and UDP socket setup",
"Implements platform-specific socket options",
"Supports IPv4 and IPv6 with automatic mapping",
"Manages socket reuse for NAT traversal"
]
},
{
"file": "./citadel_wire/src/standard/upnp_handler.rs",
"context": [
"Provides UPnP port mapping and gateway management",
"Handles automatic gateway discovery and configuration",
"Manages port forwarding for TCP and UDP protocols",
"Supports configurable lease durations and targeted forwarding",
"Implements external IP and local IP detection"
]
},
{
"file": "./citadel_wire/src/standard/quic.rs",
"context": [
"Implements QUIC protocol for secure connections",
"Supports client and server endpoints",
"Handles self-signed and PKCS#12 certificates",
"Provides NAT traversal-friendly transport",
"Uses Tokio for async/await support"
]
},
{
"file": "./citadel_wire/src/standard/tls.rs",
"context": [
"Provides TLS configuration and certificate management",
"Supports both TLS and QUIC protocols",
"Handles self-signed and PKCS#12 certificates",
"Implements native system certificate loading",
"Uses Rustls for secure TLS implementation"
]
},
{
"file": "./citadel_wire/src/standard/misc.rs",
"context": [
"Provides certificate format conversion utilities",
"Handles PKCS#12 to QUIC format conversion",
"Manages certificate chain extraction",
"Implements private key conversion",
"Ensures memory-safe certificate handling"
]
},
{
"file": "./citadel_wire/src/udp_traversal/hole_punch_config.rs",
"context": [
"Provides configuration for UDP hole punching NAT traversal",
"Handles address prediction and socket preparation",
"Configures port ranges based on NAT behavior",
"Supports both IPv4 and IPv6 traversal",
"Implements iterator-based address generation"
]
},
{
"file": "./citadel_wire/src/udp_traversal/udp_hole_puncher.rs",
"context": [
"Implements core UDP hole punching algorithm for NAT traversal",
"Handles asynchronous connection establishment between peers",
"Supports dual-stack IPv4/IPv6 with automatic retry",