简体   繁体   English

Java密码套件

[英]Java Cipher suite

I wrote a code to generate the cipher suites of a server.I am getting an output of the form TLS_RSA_WITH_AES_128_CBC_SHA . 我写了一个代码来生成服务器的密码套件。我得到了TLS_RSA_WITH_AES_128_CBC_SHA形式的输出。

Is there an API which can give me the cipher suite in parsed form like output in form of. 是否有一个API可以为我提供已解析形式的密码套件,例如形式的输出。 Assymetric algorithm used RSA,Symmetric Algorithm used AES,Key size=128,Hashing algo is SHA?. 使用RSA的对称算法,使用AES的对称算法,密钥大小= 128,哈希算法为SHA?。 I could have written a parser to parse the output,but the output not always follow the same format like sometimes the key size is missing. 我本可以编写一个解析器来解析输出,但是输出并不总是遵循相同的格式,例如有时缺少密钥大小。

Unfortunately, the Java cipher suite naming patterns follow the TLS specification naming patterns, which don't give an easy way to extract this information from the name. 不幸的是,Java密码套件的命名模式遵循TLS规范的命名模式,这没有提供一种从名称中提取此信息的简便方法。 For example, even the table in TLS 1.1 Appendix C doesn't indicate the key size for AES_128_CBC (it is in the table of the TLS 1.2 spec ). 例如,即使TLS 1.1附录C中的表也没有指出AES_128_CBC的密钥大小(它在TLS 1.2规范的表中)。 This information comes from the AES cipher suites specification . 此信息来自AES密码套件规范

Extracting these details is usually done semi-manually. 提取这些细节通常是半手工完成的。 See example implementation in Apache Tomcat's JSSESupport (eg getKeySize ) and SSLSupport . 请参阅Apache Tomcat的JSSESupport (例如getKeySize )和SSLSupport示例实现。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM