@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 CHANGED
@@ -1,11 +1,11 @@
1
- # **Aegis**
1
+ # **Aegis**
2
+ [![Codacy Badge](https://app.codacy.com/project/badge/Grade/68e739263f9740b3be6693e795d17d0a)](https://app.codacy.com/gh/imma-hq/aegis/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)![git workflow](https://github.com/imma-hq/aegis/actions/workflows/ci.yml/badge.svg?branch=main)
3
+ ![NPM Version](https://img.shields.io/npm/v/@immahq/aegis)
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
- ![git workflow](https://github.com/imma-hq/aegis/actions/workflows/ci.yml/badge.svg?branch=main)
8
- ![NPM Version](https://img.shields.io/npm/v/@immahq/aegis)
9
9
 
10
10
  ## **Core Features**
11
11
 
@@ -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.js";
7
- import { ERRORS, MAX_MESSAGE_AGE } from "./constants.js";
8
- import { serializeHeader } from "./utils.js";
9
- import { KemRatchet } from "./ratchet.js";
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.js";
2
- import { IdentityManager } from "./identity-manager.js";
3
- import { SessionManager } from "./session-manager.js";
4
- import { CryptoManager } from "./crypto-manager.js";
5
- import { RatchetManager } from "./ratchet-manager.js";
6
- import { ReplayProtection } from "./replay-protection.js";
7
- import { GroupManager } from "./group-manager.js";
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", {
@@ -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.js";
7
- import { MAX_MESSAGE_AGE } from "./constants.js";
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 // New parameter for the user's public key
128
- ) {
127
+ userPublicKey) {
129
128
  if (!this.identity) {
130
129
  throw new Error("GroupManager not initialized with identity");
131
130
  }
@@ -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.js";
6
- import { PreKeyManager } from "./prekey-manager.js";
7
- import { ERRORS } from "./constants.js";
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.js";
2
- export { MemoryStorage } from "./storage.js";
3
- export { Logger } from "./logger.js";
4
- export { KemRatchet } from "./ratchet.js";
5
- export { SessionKeyExchange } from "./session.js";
6
- export { IdentityManager } from "./identity-manager.js";
7
- export { SessionManager } from "./session-manager.js";
8
- export { CryptoManager } from "./crypto-manager.js";
9
- export { RatchetManager } from "./ratchet-manager.js";
10
- export { ReplayProtection } from "./replay-protection.js";
11
- export { GroupManager } from "./group-manager.js";
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,7 +1,7 @@
1
1
  import { bytesToHex } from "@noble/hashes/utils.js";
2
- import { Logger } from "./logger.js";
3
- import { RATCHET_AFTER_MESSAGES } from "./constants.js";
4
- import { KemRatchet } from "./ratchet.js";
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;
@@ -1,4 +1,4 @@
1
- import { MAX_STORED_MESSAGE_IDS } from "./constants.js";
1
+ import { MAX_STORED_MESSAGE_IDS } from "./constants";
2
2
  export class ReplayProtection {
3
3
  getSkippedKeyId(ratchetPublicKey, messageNumber) {
4
4
  return `${this.bytesToHex(ratchetPublicKey)}:${messageNumber}`;
@@ -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.js";
4
- import { ERRORS } from "./constants.js";
5
- import { SessionKeyExchange } from "./session.js";
6
- import { validatePublicBundle } from "./utils.js";
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.2",
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
- "react",
33
- "react native",
34
- "native",
35
- "select",
36
- "dropdown",
37
- "option"
32
+ "cryptography",
33
+ "encryption",
34
+ "e2e",
35
+ "end-to-end"
38
36
  ],
39
37
  "author": "Aegis",
40
38
  "license": "MIT",