Skip to content

Commit

Permalink
added additional NTRU OIDs to provider.
Browse files Browse the repository at this point in the history
  • Loading branch information
dghgit committed Mar 18, 2024
1 parent 2afa6ad commit 66e042b
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ public void configure(ConfigurableProvider provider)
provider.addAlgorithm("Alg.Alias.KeyGenerator." + BCObjectIdentifiers.ntruhps2048509, "NTRU");
provider.addAlgorithm("Alg.Alias.KeyGenerator." + BCObjectIdentifiers.ntruhps2048677, "NTRU");
provider.addAlgorithm("Alg.Alias.KeyGenerator." + BCObjectIdentifiers.ntruhps4096821, "NTRU");
provider.addAlgorithm("Alg.Alias.KeyGenerator." + BCObjectIdentifiers.ntruhps40961229, "NTRU");
provider.addAlgorithm("Alg.Alias.KeyGenerator." + BCObjectIdentifiers.ntruhrss701, "NTRU");
provider.addAlgorithm("Alg.Alias.KeyGenerator." + BCObjectIdentifiers.ntruhrss1373, "NTRU");

AsymmetricKeyInfoConverter keyFact = new NTRUKeyFactorySpi();

Expand All @@ -36,13 +38,17 @@ public void configure(ConfigurableProvider provider)
provider.addAlgorithm("Alg.Alias.Cipher." + BCObjectIdentifiers.ntruhps2048509, "NTRU");
provider.addAlgorithm("Alg.Alias.Cipher." + BCObjectIdentifiers.ntruhps2048677, "NTRU");
provider.addAlgorithm("Alg.Alias.Cipher." + BCObjectIdentifiers.ntruhps4096821, "NTRU");
provider.addAlgorithm("Alg.Alias.Cipher." + BCObjectIdentifiers.ntruhps40961229, "NTRU");
provider.addAlgorithm("Alg.Alias.Cipher." + BCObjectIdentifiers.ntruhrss701, "NTRU");
provider.addAlgorithm("Alg.Alias.Cipher." + BCObjectIdentifiers.ntruhrss1373, "NTRU");

registerOid(provider, BCObjectIdentifiers.pqc_kem_ntru, "NTRU", keyFact);
registerOid(provider, BCObjectIdentifiers.ntruhps2048509, "NTRU", keyFact);
registerOid(provider, BCObjectIdentifiers.ntruhps2048677, "NTRU", keyFact);
registerOid(provider, BCObjectIdentifiers.ntruhps4096821, "NTRU", keyFact);
registerOid(provider, BCObjectIdentifiers.ntruhps40961229, "NTRU", keyFact);
registerOid(provider, BCObjectIdentifiers.ntruhrss701, "NTRU", keyFact);
registerOid(provider, BCObjectIdentifiers.ntruhrss1373, "NTRU", keyFact);
}
}
}

0 comments on commit 66e042b

Please sign in to comment.