Post-Quantum Cryptography
In the following algorithms are outline approved by the Federal Information Processing Standards (FIPS) for post-quantum cryptography:
- FIPS 203 (CRYSTALYS-KYBER), Module-Lattice-Based Key-Encapsulation Mechanism Standard
- FIPS 204 (CRYTALS-DILITHIUM), Module-Lattice-Based Digital Signature Standard
- FIPS 205 (SPHINCS+), Stateless Hash-Based Digital Signature Standard
These standards specify key establishment and digital signature schemes that are designed to resist future attacks by quantum computers, which threaten the security of current standards. The three algorithms specified in these standards are each derived from different submissions to the NIST Post-Quantum Cryptography Standardization Project.
Type | Public-Key Encryption / KEMs | Digital Signatures |
---|---|---|
Lattice-based | CRYSTALYS-KYBER | CRYTALS_DILITHIUM |
Hash-based | SPHINCS+ |
PQC - Rest API (Example)
PQC algorithms do support Securosys Smart Key Attributes, following the same principles. Click here
Create PQC-Key
POST: /v1/key
Description: Create key request.
- Dilithium (FIPS 204)
- Sphincs+ (FIPS-205)
- LMS
{
"label": "pqc_dilithium_fips204_final",
"password": null,
"algorithm": "ML-DSA-44",
"attributes": {
"sign": true,
"decrypt": false,
"unwrap": false,
"extractable": false,
"modifiable": true,
"destroyable": true,
"sensitive": true
}
}
Supported Algorithms: ML-DSA-44, ML-DSA-65, ML-DSA-87
{
"label": "pqc_sphincs_plus_fips205_final",
"password": null,
"algorithm": "SLH-DSA-SHA2-128f",
"attributes": {
"sign": true,
"decrypt": false,
"unwrap": false,
"extractable": false,
"modifiable": true,
"destroyable": true,
"sensitive": true
}
}
Supported Algorithms:SLH-DSA-SHA2-128s, SLH-DSA-SHA2-128f, SLH-DSA-SHA2-192s, SLH-DSA-SHA2-192f, SLH-DSA-SHA2-256s, SLH-DSA-SHA2-256f, SLH-DSA-SHAKE-128s, SLH-DSA-SHAKE-128f, SLH-DSA-SHAKE-192s, SLH-DSA-SHAKE-192f, SLH-DSA-SHAKE-256s, SLH-DSA-SHAKE-256f
{
"label": "pqc_lms",
"password": null,
"algorithm": "LMS",
"attributes": {
"sign": true,
"decrypt": false,
"unwrap": false,
"extractable": false,
"modifiable": true,
"destroyable": true,
"sensitive": true
}
}
Supported Algorithms: LMS
Sign a Payload
POST: /v1/synchronousSign
Description: Sign request, the payload (message to be signed) must be base64-encoded.
The signatureAlgorithm
is: DILITHIUM, KYBER, SPHINCS_PLUS, or LMS
- Dilithium (FIPS 204)
- Sphincs+ (FIPS-205)
- LMS
{
"signRequest": {
"payload": "U29tZVBheWxvYWQ=",
"payloadType": "UNSPECIFIED",
"signKeyName": "pqc_dilithium_fips204_final",
"keyPassword": null,
"signatureAlgorithm": "DILITHIUM"
}
}
Supported Algorithms: DILITHIUM
Signature Size
Algorithm | RAW signature (Bytes) | Base64-Encoded (Bytes) |
---|---|---|
ML-DSA-44 | 2420 | 3228 |
ML-DSA-65 | 3309 | 4412 |
ML-DSA-87 | 4627 | 6172 |
{
"signRequest": {
"payload": "U29tZVBheWxvYWQ=",
"payloadType": "UNSPECIFIED",
"signKeyName": "pqc_sphincs_plus_fips205_final",
"keyPassword": null,
"signatureAlgorithm": "SPHINCS_PLUS"
}
}
Supported Algorithms: SPHINCS_PLUS
Signature Size
Algorithm | RAW signature (Bytes) | Base64-Encoded (Bytes) |
---|---|---|
SLH-DSA-SHA2-128f | 17088 | 22784 |
SLH-DSA-SHA2-192f | 35664 | 47552 |
SLH-DSA-SHA2-256f | 49856 | 66476 |
SLH-DSA-SHAKE-128f | 17088 | 22784 |
SLH-DSA-SHAKE-192f | 35664 | 47552 |
SLH-DSA-SHAKE-256f | 49856 | 66476 |
{
"signRequest": {
"payload": "U29tZVBheWxvYWQ=",
"payloadType": "UNSPECIFIED",
"signKeyName": "pqc_lms",
"keyPassword": null,
"signatureAlgorithm": "LMS"
}
}
Supported Algorithms: LMS
Signature Size
Algorithm | RAW signature (Bytes) | Base64-Encoded (Bytes) |
---|---|---|
LMS | 8688 | 11584 |
Response (Dilithium):
{
"signature": "EvnLTaqpBFy82bmdGdjz3Ec7blyjVngT6ev1M2Jr1QsuDEfzsZafEcEspDT8GoeQcfrJzB2n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+fYni6Nljkod6LghkVOCEKUDuCWCPJVXGKPgRvoRjmJoy7tjMKGQvez60gpmtJuJaLufUoSXQLV2Ivv4G75uM6U8VtO38y/owTmGdWTLjKc2JdIpgWXme4vgMtgX/tfe+Hz0Q4YybfcSK8cEKtRMam6as8zVJWMzzmKxJ0dMyn5G36pIuZ5FFS7hZLqlXkBQUF+wO2006JwGUaeFfd4R/WV83NT0Ek8fSVS7BUo7JdPMCK4nKmxX3oJecPVi9OvCSBReRDj+H2rL4b55/ERt8llAUKetiCAG4JTnofGEuz3/gZxSQKIGm0LihnxQvjybfNL1aeBniI/w+ytQJhffA3/y6/uAN4wGOTUGQLN3gqB5Qdt1SbqGgkxjQEKbVv60c1M6iF2TTRypLKPrUbx1K7e8XAQ2frbVJ7PqgliOiRoPUCe0pWXfsWZe0OP6vkiEez9Bg4Jj/58NQ8wG5Vpd9p1uQaC3OS/oeAn8OzABj4CHIet413VJHPu46cVgAMeOnzd6L5RaBFEDazPvEECVI0lZyy/7IC/7S+q5v1OFN6xEioYpT07XlfcUQsbXY22u6d/5tygxP07Vxm3i9CUCg71jre/Fx0s9A/YqiHQAixi47248piejaFwcnsFyulhwa5oJ2jJQ46xmfGVAxVFrNfzC2FbvJXNnhNcs5h9UvHhwednTWMY89qKWGgtazXMVGB5QpvyrzZlk2PuUt0Ot/zhsaZozFAAmlUFdz+9UezN3WRb1hLuUJm/UK5DX8KXgTIspy1SZwvZ1hQ6DHoXsvAQFlGlO3qQJ/9HgdqCTM8LGd8f1T42hjje37s4RHIhUBJeY+BbEE8vNpPDJ5uIZK35vJeth5Ej4BY9WUjjMRqnarcDChwkRkdgYWRncHF2eHyLz+P0/ihQVFhdd3h7m6mrwdDl8voACR87PVBbeX2Bnau/wMLl7PgKE1BqbnZ3fYOgtMLE0/IAAAAAAAAAAAAAABQkNkU="
}
Verify
POST: /v1/verify
Description Verify signature of a payload
Replace the signature
from the previous response with the payload
- Dilithium (FIPS 204)
- Sphincs+ (FIPS-205)
- LMS
{
"verifySignatureRequest": {
"signKeyName": "pqc_dilithium_fips204_final",
"signatureAlgorithm": "DILITHIUM",
"payload": "U29tZVBheWxvYWQ=",
"signature": "m2MX/8Murbk0rCWz5OD/3PtYoZbMDZkdTYH/BgWv7KCu8FVQJ7rhRNp/OlS9aNbCXSYzJmD...."
}
}
{
"verifySignatureRequest": {
"signKeyName": "pqc_sphincs_plus_fips205_final",
"signatureAlgorithm": "SPHINCS_PLUS",
"payload": "U29tZVBheWxvYWQ=",
"signature": "hmWYnbg7zvsW+CCmhDMX7hImTWQmeKmRxTr8UW5SZyRfIpGLvGkixWh2GVi/vMZ1ukJ0KVv...."
}
}
{
"verifySignatureRequest": {
"signKeyName": "pqc_lms",
"signatureAlgorithm": "LMS",
"payload": "U29tZVBheWxvYWQ=",
"signature": "AAAAAAAAAAAAAAABnKAGK1dKoqzFlzpw8V2Hd1fsZ/Jl1incDsiJXW766AN8MKLP1ANzESVGK..."
}
}
Supported Algorithms: LMS
Response
{
"signatureValid": true
}
Local Verify (BouncyCastle)
The publicKey
can be retrieved by fetching the key-attributes.
- POST /v1/key/attributes
- Dilithium (FIPS 204)
- Sphincs+ (FIPS-205)
- LMS
/*
* Copyright (c)2015-2024, Securosys SA
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*/
import java.security.*;
import java.security.spec.X509EncodedKeySpec;
import java.util.Base64;
/**
* Illustrates ML-DSA/Dilithium signatures.
*/
public class VerifyMlDsaBcSample {
public static void main(final String... args) throws Exception {
final String base64Signature = "m2MX/8Murbk0rCWz5OD/3PtYoZbMDZkdTYH/BgWv7KCu8F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6/J5He52nFgUBgGB5PHKQfJR2a4JSkB40e9TuUWzdwddIqxkqO/hGHfL//dMqNGBlclAOYMHKTsalg780Uc6wBqL2dU/tSbHlsL2HU47CaAKuAv8q5VFsZ+niNR0s9mqpJX5QDLFJDfPJucClp6oP57LQZZGc6KcnS7azQ5ODWVuBsa4n63VpZVPdtWLGOoLNB1Qz6uvODlwuWRuO3dTNYxp3xSoFGwv67NiVorPATsetVsA6J0BFV48HQCA4SNwZ0r69KdNyEATDV4uXoaXZnNpe3drOZ8cwICzMRIks7QJUYnDXcW5s0dICKCScgChz8r2GiaYulWje1sAd2YikUJwgC9Gz11IxmvBhUh16ydr+KVRbcgzHvf1a09krdnCsnOtWi7fFsSDZG50myUIlsj8b6atEpzobfp1DrL7eHvCrZUroazsmyL9Y4R/gWsAgQ2K53vxzXch45xXzI/5fbcyHsXxe1I6dKs1bySassSlLuE9g3IkR3HFNyTD4OYapywiLn5uWx2rAHVey0JEE3KauNvAT3IMRkbuH6IFj+3lIz35/06agnbWyaCgZb3VlSck0NL0XCIuSj2T8WyFgf3V9RQCm3x7C+NriOu3JypE046Vl8jkMjJfj0x+XbLgfv+qzdZ7COGDclmYxst/o2yoc=";
Security.addProvider((Provider)Class.forName("org.bouncycastle.jce.provider.BouncyCastleProvider").getConstructor().newInstance());
final Provider provider = Security.getProvider("BC");
final String mlDsaSignatureAlgorithm = "ML-DSA";
final KeyFactory mlDsaKeyFactory = KeyFactory.getInstance(mlDsaSignatureAlgorithm, provider);
PublicKey mlDsaPublicKey = mlDsaKeyFactory.generatePublic(new X509EncodedKeySpec(Base64.getDecoder().decode(publicKey)));
final Signature mlDsaSignature = Signature.getInstance(mlDsaSignatureAlgorithm, provider);
mlDsaSignature.initVerify(mlDsaPublicKey);
mlDsaSignature.update(Base64.getDecoder().decode(payload));
final boolean verified = mlDsaSignature.verify(Base64.getDecoder().decode(base64Signature));
System.out.println("verified: " + verified);
}
}
/*
* Copyright (c)2015-2024, Securosys SA
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*/
import java.security.*;
import java.security.spec.X509EncodedKeySpec;
import java.util.Base64;
/**
* Illustrates SLH-DSA/Sphincs+ signatures.
*/
public class VerifySlhDsaBcSample {
public static void main(final String... args) throws Exception {
final String base64Signature = "NIB4HYDOE2OuUBDPjd/9dwDxJXQpRJ7kK5L6HL8izWNxJoz7cDk5nHu6z82jno57dJaFpJhnhH0NEypLVwolIvhUQaOl9Xx3pom1ZEhKh0fU1pPtPq3xdcS70ffO3vxAdwdPwPsctZ8S+oWnS0tKC+yuLzTZf2VFjsvzoUd48ptPsi6Wae1djApRwLprXonD4zIU7CUTfMyiAiuzmqlVBoyui2MDqQvfNfxNfXG/sQw9jyTQqMcLxFm/hX6Ln/Fkw22AEygNQO8aZrsh7p55U8jADmkA1E9uwamnUn6MUuHzw7Nw+ZwyWUSmzN3Fud3bLmTpizWmBKMl1UDTd0bmma2OGfo6Mknmym50mKXeYTqN+e41+am7c78K3mpIqmr0XslCNWesuFB1GGAwHtXIWFZFFf8A/aDNCr3ayq4Y8RyQgqDhYdGQlQUsIvwxlnO6zbck/qRuFdL4KXvSSzuIOrsHRrrEE7lEz/YhH9CAwRZAK0hjm/KO9ma67E3pprOTnEmvdtSdBGiaJmwcE78ztOeAukrjQ6JRMlh1NCe6XD77RrmOvOqHXU7hq4eXAn951/zxowDLP1UiMiq+jxkTsXONX8/CUcKSC9d/Hokx91O6HX7cxUZSAH2P7SFsp2Pku5Eg3IuaANhKfLq8Fpv3WA0zzja0ZGKmFjiyC438v79hp7VZY89PgoZNBlhYqR3qjHTIQEW55KzbtD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K6eMYHInkSysVALCag9OIhyv4UXBW74fHlSzElXw6nkYWscXpOQVOgj48dk9iygwcOH2gCu5W5bzQ6FMARrj/ZY3OEywdkYhi6ACJ1ry4BYsZzSdSzKnpw81fslUnVSOxZaATktKgB6DmKnRkVBSzGmr+WGSsBzQlIa6ld92r1lBg4FnAD+vTDvbzAygDw+g6ZN0rJysemz7Cl+KAZ2XxsRjG/JoANaYjFTyZqjTIdTMdvefxyeN3gDVGoeWPlTVcz24vSCNMDOsEnf0TEnpbVag4S5xpLfCjTCE8GP8fTEK+g3ZBqCq7t6ff3A0IzNxZtrgYhINxwNw+H4xvbjt2TfLVFFvsFA0GXdivJPMDWy3kALpbekE9qeHKzGCCpaNBCyLF0eZOTEL0xVGVrX+ICn92lqWn6RrLKoKVUw3C5jlgNUkP99IfO7";
final String payload = "U29tZVBheWxvYWQ=";
final String publicKey = "MDAwCwYJYIZIAWUDBAMVAyEAqglEBiJhMCfqdNC5nWbvCcSItS+EtF9QlD4/fOB9g2s=";
Security.addProvider((Provider)Class.forName("org.bouncycastle.jce.provider.BouncyCastleProvider").getConstructor().newInstance());
final Provider provider = Security.getProvider("BC");
final String slhDsaSignatureAlgorithm = "SLH-DSA";
final KeyFactory slhDsaKeyFactory = KeyFactory.getInstance(slhDsaSignatureAlgorithm, provider);
PublicKey slhDsaPublicKey = slhDsaKeyFactory.generatePublic(new X509EncodedKeySpec(Base64.getDecoder().decode(publicKey)));
final Signature slhDsaSignature = Signature.getInstance(slhDsaSignatureAlgorithm, provider);
slhDsaSignature.initVerify(slhDsaPublicKey);
slhDsaSignature.update(Base64.getDecoder().decode(payload));
final boolean verified = slhDsaSignature.verify(Base64.getDecoder().decode(base64Signature));
System.out.println("verified: " + verified);
}
}
/*
* Copyright (c)2015-2024, Securosys SA
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*/
import java.security.*;
import java.security.spec.X509EncodedKeySpec;
import java.util.Base64;
/**
* Illustrates LMS/BC signatures.
*/
public class VerifyLMSBcSample {
public static void main(final String... args) throws Exception {
final String base64Signature = "AAAAAAAAAAYAAAABc3dIzJW8l4n31bNiSlGYpcn2No1mvr3+2DsI5+1WRjHkMPdJ4QniFJ134az3NKflSEfzQ/C5Zat1u4aw47c20UVPBPT5KAXWq7I3/HS3xG2mNtDkv/bffic3mi1AHyDCFcDESw0kZbonoa2e/pRgnFeb7w9a3aBMVVIxDWcMXSVGeR11B3GCkghpYOXMLdBOwLGyPVfxZAdd3QG8P7WqeBtv5JBcMVF/LpQjRTPD6UuJ5DFeutCuWcsgyy1psNQdFlZXToawDVaGBIixettnnkp4wm//DU4oOkQh4WKReOdSYVpUWCb4ORprc3Y4njZTYWRr7RDlGvr7qKUmbjgvBPOuYk2jusEBIgUrhiRZAP83PCZJuzmQx9556V/0Cj3oS/MO76q2CwGhoXwxCgJJpSKSqk7y6cPmZ5RJN0egl9TyXoTNIOmycdvUqNNGMSnEZTp77S9vkY6R4tAvpTWCWmqU2LOOXE5gmcyxwgX5C2nvOJa6Oth944LxFw5dYTnolxIJELTtXStzqKPYL6rUuzXshjXU7nrlz/C/tMfAQh/ZusqouGvtolZqrdKNoR4r2VzQawSvpE72T1isazJFJwsbf5LLxu9A+15ZkgJ9y0AMKOEQ+K/lKJR/2++ThJOifhoak0BDRRdUs85Q6lLlzwZGc8E7yiRx7LOfgicelga6V/+sIWR6Lyqcg60QXwx0wtsMJUpZCrs8kjFCFSoBiwVHMh+h4dsJrFmndt9kMDfrYWd3u5wpZnFW4jZ4xm+uEBRjcgsYjzaYizfRHG3Eu0WIpNsD7htAIgTA9IDshMXIzXZ8DXyJ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jfVeSikF2IoY1WiR06VxyKLel6LsLXeOJkixxSuy7R6tiLotGNlfo+o3Umuzm5OwD9GW5GDnwkfTwV6RPhg1U97wq8F93w5pU47YjjNJbIMVAbdzzduh4mcvyEO4tGqqDGE384XCy4M6y/zJLVTkTHdm8JDfr56CqLbsP7v8ttDmM+w7f+4cEWapDMneAGBIXA8SnQvmr0KQJPbegsQZM+1jw2jduzP4N736DDjqDxwmoyQjpAyGtWMvmPyD0eJBZ+xdGH3NIbUVSovHqiHKVx+lz8qmlv+1823C61bRK+hJD81EnXZSd357walIpGg08fJCumNIGpSX48CSoBDM2GMBGasiv5MwK+EScnyFFSEA6LItwBWdx6ys+dHaKL3cKOKZtK66lIHaU0Fm5dYwViJxCZKE/SA35qGUVKXJoQvf2ON2VZVaGkT2cSH6sTRYoZsCO1jZ1nr93+kVhhusWxG4lXglHNXn7PwBR0pymurmcXovM+iiWbjAfG58XXF63FgYz8lwSh+lkTgIsZLNq+tSAYPg6dW6opUHqZNMn5fKg1xURRazbMvwCrSUymhw0Qg2EUnUlfBl5s5TVcUtnbdQZRwsP++GPKaBkFfSOVgIBc0/OJkqhp3RC4rtUiIHXBafyL/YL4LbC/LCwkKUl80rtVZFLu/oxcBrVqz64GK2MG4MWSAf2GoKYUxXn+KMD9g+GHylCtNpAM6J56dm8ieDaWzPXLW9Ghhd9lZedvSQi0knD8QmjKMgh3PjTD9yBfxg6/IndKJmc0q4n0G8+YCuBXvIeJsjDgAAAAWj8DafNZ60EvhlRd48a/6PggypmcXeMKWJZiw434O7UpPctR/28joEzNTnWjt7WMwr5TgZj7Pd9D4JCVGkP1WLjJHWFi+Dge/QvgySfAzeHnwDe0viY+4afCB8w2EjcZLJDc2ZPM982Zcj1L26rcW3BLjhBPpYCuuIncQTei6ejpLDrD5I0fbcCTTdA6C0zQY41/tPrTJ+veJxsvec1irF";
final String payload = "U29tZVBheWxvYWQ=";
final String publicKey = "ME4wDQYLKoZIhvcNAQkQAxEDPQAAAAABAAAABQAAAAG/Y2bjcDH4ScYJVpt5nAECBMPkMN9dwtluItIyW7fmNh3Yy1LYYpjquaBxnWs8q6I=";
Security.addProvider((Provider)Class.forName("org.bouncycastle.jce.provider.BouncyCastleProvider").getConstructor().newInstance());
final Provider provider = Security.getProvider("BC");
final String lmsSignatureAlgorithm = "LMS";
final KeyFactory lmsKeyFactory = KeyFactory.getInstance(lmsSignatureAlgorithm, provider);
PublicKey lmsPublicKey = lmsKeyFactory.generatePublic(new X509EncodedKeySpec(Base64.getDecoder().decode(publicKey)));
final Signature lmsSignature = Signature.getInstance(lmsSignatureAlgorithm, provider);
lmsSignature.initVerify(lmsPublicKey);
lmsSignature.update(Base64.getDecoder().decode(payload));
final boolean verified = lmsSignature.verify(Base64.getDecoder().decode(base64Signature));
System.out.println("verified: " + verified);
}
}