@immahq/aegis 0.0.2 → 0.0.4
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 +3 -3
- package/dist/crypto-manager.js +4 -4
- package/dist/e2ee.js +7 -7
- package/dist/group-manager.js +3 -4
- package/dist/identity-manager.js +3 -3
- package/dist/index.js +11 -11
- package/dist/ratchet-manager.js +3 -3
- package/dist/replay-protection.js +1 -1
- package/dist/session-manager.js +4 -4
- package/package.json +5 -7
package/README.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
# **Aegis**
|
|
1
|
+
# **Aegis**
|
|
2
|
+
[](https://app.codacy.com/gh/imma-hq/aegis/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
|
|
3
|
+

|
|
2
4
|
|
|
3
5
|
**Aegis** is a lightweight, storage-agnostic library for client-side End-to-End (E2E) encryption, designed for future security. It combines the NIST-standardized ML-KEM 768 algorithm for quantum-resistant key agreement with high-performance symmetric cryptography (ChaCha20-Poly1305, Blake3) to provide secure 1:1 sessions and scalable group messaging.
|
|
4
6
|
|
|
5
7
|
---
|
|
6
8
|
|
|
7
|
-

|
|
8
|
-

|
|
9
9
|
|
|
10
10
|
## **Core Features**
|
|
11
11
|
|
package/dist/crypto-manager.js
CHANGED
|
@@ -3,10 +3,10 @@ import { ml_dsa65 } from "@noble/post-quantum/ml-dsa.js";
|
|
|
3
3
|
import { blake3 } from "@noble/hashes/blake3.js";
|
|
4
4
|
import { randomBytes } from "@noble/post-quantum/utils.js";
|
|
5
5
|
import { bytesToHex, concatBytes, utf8ToBytes } from "@noble/hashes/utils.js";
|
|
6
|
-
import { Logger } from "./logger
|
|
7
|
-
import { ERRORS, MAX_MESSAGE_AGE } from "./constants
|
|
8
|
-
import { serializeHeader } from "./utils
|
|
9
|
-
import { KemRatchet } from "./ratchet
|
|
6
|
+
import { Logger } from "./logger";
|
|
7
|
+
import { ERRORS, MAX_MESSAGE_AGE } from "./constants";
|
|
8
|
+
import { serializeHeader } from "./utils";
|
|
9
|
+
import { KemRatchet } from "./ratchet";
|
|
10
10
|
export class CryptoManager {
|
|
11
11
|
constructor(storage) {
|
|
12
12
|
Object.defineProperty(this, "storage", {
|
package/dist/e2ee.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Logger } from "./logger
|
|
2
|
-
import { IdentityManager } from "./identity-manager
|
|
3
|
-
import { SessionManager } from "./session-manager
|
|
4
|
-
import { CryptoManager } from "./crypto-manager
|
|
5
|
-
import { RatchetManager } from "./ratchet-manager
|
|
6
|
-
import { ReplayProtection } from "./replay-protection
|
|
7
|
-
import { GroupManager } from "./group-manager
|
|
1
|
+
import { Logger } from "./logger";
|
|
2
|
+
import { IdentityManager } from "./identity-manager";
|
|
3
|
+
import { SessionManager } from "./session-manager";
|
|
4
|
+
import { CryptoManager } from "./crypto-manager";
|
|
5
|
+
import { RatchetManager } from "./ratchet-manager";
|
|
6
|
+
import { ReplayProtection } from "./replay-protection";
|
|
7
|
+
import { GroupManager } from "./group-manager";
|
|
8
8
|
export class E2EE {
|
|
9
9
|
constructor(storage) {
|
|
10
10
|
Object.defineProperty(this, "identityManager", {
|
package/dist/group-manager.js
CHANGED
|
@@ -3,8 +3,8 @@ import { ml_dsa65 } from "@noble/post-quantum/ml-dsa.js";
|
|
|
3
3
|
import { blake3 } from "@noble/hashes/blake3.js";
|
|
4
4
|
import { randomBytes } from "@noble/post-quantum/utils.js";
|
|
5
5
|
import { bytesToHex, concatBytes, utf8ToBytes } from "@noble/hashes/utils.js";
|
|
6
|
-
import { Logger } from "./logger
|
|
7
|
-
import { MAX_MESSAGE_AGE } from "./constants
|
|
6
|
+
import { Logger } from "./logger";
|
|
7
|
+
import { MAX_MESSAGE_AGE } from "./constants";
|
|
8
8
|
export class GroupManager {
|
|
9
9
|
constructor(storage) {
|
|
10
10
|
Object.defineProperty(this, "storage", {
|
|
@@ -124,8 +124,7 @@ export class GroupManager {
|
|
|
124
124
|
return group;
|
|
125
125
|
}
|
|
126
126
|
async addMember(groupId, userId, _session, // Unused parameter, using underscore prefix
|
|
127
|
-
userPublicKey
|
|
128
|
-
) {
|
|
127
|
+
userPublicKey) {
|
|
129
128
|
if (!this.identity) {
|
|
130
129
|
throw new Error("GroupManager not initialized with identity");
|
|
131
130
|
}
|
package/dist/identity-manager.js
CHANGED
|
@@ -2,9 +2,9 @@ import { ml_kem768 } from "@noble/post-quantum/ml-kem.js";
|
|
|
2
2
|
import { ml_dsa65 } from "@noble/post-quantum/ml-dsa.js";
|
|
3
3
|
import { blake3 } from "@noble/hashes/blake3.js";
|
|
4
4
|
import { bytesToHex, concatBytes } from "@noble/hashes/utils.js";
|
|
5
|
-
import { Logger } from "./logger
|
|
6
|
-
import { PreKeyManager } from "./prekey-manager
|
|
7
|
-
import { ERRORS } from "./constants
|
|
5
|
+
import { Logger } from "./logger";
|
|
6
|
+
import { PreKeyManager } from "./prekey-manager";
|
|
7
|
+
import { ERRORS } from "./constants";
|
|
8
8
|
export class IdentityManager {
|
|
9
9
|
constructor(storage) {
|
|
10
10
|
Object.defineProperty(this, "storage", {
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export { E2EE as Aegis } from "./e2ee
|
|
2
|
-
export { MemoryStorage } from "./storage
|
|
3
|
-
export { Logger } from "./logger
|
|
4
|
-
export { KemRatchet } from "./ratchet
|
|
5
|
-
export { SessionKeyExchange } from "./session
|
|
6
|
-
export { IdentityManager } from "./identity-manager
|
|
7
|
-
export { SessionManager } from "./session-manager
|
|
8
|
-
export { CryptoManager } from "./crypto-manager
|
|
9
|
-
export { RatchetManager } from "./ratchet-manager
|
|
10
|
-
export { ReplayProtection } from "./replay-protection
|
|
11
|
-
export { GroupManager } from "./group-manager
|
|
1
|
+
export { E2EE as Aegis } from "./e2ee";
|
|
2
|
+
export { MemoryStorage } from "./storage";
|
|
3
|
+
export { Logger } from "./logger";
|
|
4
|
+
export { KemRatchet } from "./ratchet";
|
|
5
|
+
export { SessionKeyExchange } from "./session";
|
|
6
|
+
export { IdentityManager } from "./identity-manager";
|
|
7
|
+
export { SessionManager } from "./session-manager";
|
|
8
|
+
export { CryptoManager } from "./crypto-manager";
|
|
9
|
+
export { RatchetManager } from "./ratchet-manager";
|
|
10
|
+
export { ReplayProtection } from "./replay-protection";
|
|
11
|
+
export { GroupManager } from "./group-manager";
|
package/dist/ratchet-manager.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { bytesToHex } from "@noble/hashes/utils.js";
|
|
2
|
-
import { Logger } from "./logger
|
|
3
|
-
import { RATCHET_AFTER_MESSAGES } from "./constants
|
|
4
|
-
import { KemRatchet } from "./ratchet
|
|
2
|
+
import { Logger } from "./logger";
|
|
3
|
+
import { RATCHET_AFTER_MESSAGES } from "./constants";
|
|
4
|
+
import { KemRatchet } from "./ratchet";
|
|
5
5
|
export class RatchetManager {
|
|
6
6
|
shouldPerformSendingRatchet(session) {
|
|
7
7
|
const messageCount = session.sendingChain?.messageNumber || 0;
|
package/dist/session-manager.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ml_kem768 } from "@noble/post-quantum/ml-kem.js";
|
|
2
2
|
import { ml_dsa65 } from "@noble/post-quantum/ml-dsa.js";
|
|
3
|
-
import { Logger } from "./logger
|
|
4
|
-
import { ERRORS } from "./constants
|
|
5
|
-
import { SessionKeyExchange } from "./session
|
|
6
|
-
import { validatePublicBundle } from "./utils
|
|
3
|
+
import { Logger } from "./logger";
|
|
4
|
+
import { ERRORS } from "./constants";
|
|
5
|
+
import { SessionKeyExchange } from "./session";
|
|
6
|
+
import { validatePublicBundle } from "./utils";
|
|
7
7
|
export class SessionManager {
|
|
8
8
|
constructor(storage) {
|
|
9
9
|
Object.defineProperty(this, "storage", {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@immahq/aegis",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"description": "Lightweight, storage-agnostic library for client-side End-to-End (E2E) encryption",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -29,12 +29,10 @@
|
|
|
29
29
|
"url": "git+ssh://git@github.com/imma-hq/aegis.git"
|
|
30
30
|
},
|
|
31
31
|
"keywords": [
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"dropdown",
|
|
37
|
-
"option"
|
|
32
|
+
"cryptography",
|
|
33
|
+
"encryption",
|
|
34
|
+
"e2e",
|
|
35
|
+
"end-to-end"
|
|
38
36
|
],
|
|
39
37
|
"author": "Aegis",
|
|
40
38
|
"license": "MIT",
|