Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose AEAD Classes for CipherSuiteParams. #194

Merged
merged 2 commits into from
Jul 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@ export {
DhkemX448HkdfSha512,
} from "./src/kems/dhkem.ts";
export { HkdfSha256, HkdfSha384, HkdfSha512 } from "./src/kdfs/hkdf.ts";
export { Aes128Gcm, Aes256Gcm } from "./src/aeads/aesGcm.ts";
export { Chacha20Poly1305 } from "./src/aeads/chacha20Poly1305.ts";
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions src/cipherSuite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ import {
SenderExporterContext,
} from "./exporterContext.ts";
import { AeadId, KdfId, KemId, Mode } from "./identifiers.ts";
import { Aes128Gcm, Aes256Gcm } from "./aeadKeys/aesGcmKey.ts";
import { ExportOnly } from "./aeadKeys/exportOnly.ts";
import { Chacha20Poly1305 } from "./aeadKeys/chacha20Poly1305Key.ts";
import { Aes128Gcm, Aes256Gcm } from "./aeads/aesGcm.ts";
import { ExportOnly } from "./aeads/exportOnly.ts";
import { Chacha20Poly1305 } from "./aeads/chacha20Poly1305.ts";
import { HkdfSha256, HkdfSha384, HkdfSha512 } from "./kdfs/hkdf.ts";
import { RecipientContext } from "./recipientContext.ts";
import { SenderContext } from "./senderContext.ts";
Expand Down
3 changes: 2 additions & 1 deletion test/cipherSuite.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
DhkemX448HkdfSha512,
} from "../src/kems/dhkem.ts";
import { HkdfSha256, HkdfSha384, HkdfSha512 } from "../src/kdfs/hkdf.ts";
import { Aes128Gcm } from "../src/aeads/aesGcm.ts";

import * as errors from "../src/errors.ts";

Expand Down Expand Up @@ -231,7 +232,7 @@ describe("CipherSuite", () => {
const suite = new CipherSuite({
kem: new DhkemP256HkdfSha256(),
kdf: new HkdfSha256(),
aead: AeadId.Aes128Gcm,
aead: new Aes128Gcm(),
});

const rkp = await suite.generateKeyPair();
Expand Down
4 changes: 2 additions & 2 deletions test/encryptionContext.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import { AeadId, KdfId, KemId } from "../src/identifiers.ts";
import { HkdfSha256 } from "../src/kdfs/hkdf.ts";
import { loadSubtleCrypto } from "../src/webCrypto.ts";
import { i2Osp } from "../src/utils/misc.ts";
import { ExportOnly } from "../src/aeadKeys/exportOnly.ts";
import { Aes128Gcm } from "../src/aeadKeys/aesGcmKey.ts";
import { ExportOnly } from "../src/aeads/exportOnly.ts";
import { Aes128Gcm } from "../src/aeads/aesGcm.ts";

import * as consts from "../src/consts.ts";
import * as errors from "../src/errors.ts";
Expand Down