Skip to content

Session encryption#45

Merged
ondratu merged 2 commits intomasterfrom
session_encryption
May 1, 2026
Merged

Session encryption#45
ondratu merged 2 commits intomasterfrom
session_encryption

Conversation

@ondratu
Copy link
Copy Markdown
Contributor

@ondratu ondratu commented May 1, 2026

No description provided.

ondratu added 2 commits May 1, 2026 13:34
- PoorSession uses shake_256 XOF for 1024 B keystream + byte-substitution;
  no external dependencies required
- HMAC-SHA256 authentication (Encrypt-then-MAC) — tampered or forged
  cookies are rejected before decryption
- Domain-separated key derivation (keystream / MAC / permutation)
- Cookie format: base64(ciphertext).base64(hmac)
- New tests: tampered cookie rejected, wrong key rejected
- Documentation and ChangeLog updated; upgrade invalidates existing cookies
- add Session as a plain cookie wrapper (no encryption)
- PoorSession now inherits from Session and reuses common cookie logic
- Session is suitable for server-side session IDs or JWTs
- update documentation and tests
@ondratu ondratu merged commit bba7e36 into master May 1, 2026
4 checks passed
@ondratu ondratu deleted the session_encryption branch May 1, 2026 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant