如何将 HSM 加密与 JAVA 集成?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/12981977/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-31 11:02:52  来源:igfitidea点击:

How do I integrate HSM encryption with JAVA?

javasecurityencryptionhsm

提问by Armin

How do i integrate Hardware Security Module encryption with a java application? I'm looking for code samples to connect to HSMs, generate keys(asymmetric, symmetric), encrypt and decrypt data (asymmetric, symmetric) and store keys.

我如何将硬件安全模块加密与 Java 应用程序集成?我正在寻找代码示例以连接到 HSM、生成密钥(非对称、对称)、加密和解密数据(非对称、对称)和存储密钥。

采纳答案by Frank

In JAVA you can just use JCE/JCA. Ask you provider for the implementation, you will need some jar files, and you're ready.

在 JAVA 中,您可以只使用 JCE/JCA。向您的提供者询问实现,您将需要一些 jar 文件,并且您已准备就绪。

回答by Zhenxin Sun

All HSM should support common API interfaces, such as PKCS11, JCE or MSCAPI. For Java integration, they would offers JCE CSP provider as well. Simply configure the provider, and they you can use the Keystore/KeyGenerator as per normal.

所有 HSM 都应支持通用 API 接口,例如 PKCS11、JCE 或 MSCAPI。对于 Java 集成,他们还将提供 JCE CSP 提供程序。只需配置提供程序,他们就可以照常使用密钥库/密钥生成器。