检查Unlimited Cryptography是否可用 [英] Checking if Unlimited Cryptography is available

查看:124
本文介绍了检查Unlimited Cryptography是否可用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在Java代码中检查当前JVM是否具有可用的无限强度加密?

How can I check, in Java code, if the current JVM have unlimited strength cryptography available?

推荐答案

我认为你可以使用 Cipher.getMaxAllowedKeyLength(),同时还将您正在使用的密码与已知的好安全密码列表进行比较,例如AES。

I think you could probably use Cipher.getMaxAllowedKeyLength(), while also comparing the cypher you're using to known lists of "good", secure cyphers, such as AES.

< a href =http://download.oracle.com/javase/1.4.2/docs/guide/security/jce/JCERefGuide.html#AppE =noreferrer>这是一篇参考文章,其中列出了截至Java 1.4的最大密钥大小管辖限制(这些限制可能没有改变,除非法律也发生了变化 - 见下文)。

Here's a reference article that lists maximum key size jurisdiction limitations that were current as of Java 1.4 (these likely haven't changed, unless the law has also changed - see below).

如果您正在运营在一个有加密出口/进口限制的国家,你必须咨询你所在国家的法律,但在这些情况下可能是安全的。你没有在你的JVM中有可用的无限强度加密(默认情况下)。换句话说,假设您正在使用来自Oracle的官方JVM ,而您碰巧住了在一个美国对加密出口限制的国家(由于甲骨文是美国公司,它将受到这些限制),那么在这种情况下你也可以假设你没有无限的力量可用。

If you are operating in a nation that has cryptographic export/import restrictions, you'd have to consult the law in your nation, but it's probably safe to assume in these situations that you don't have unlimited strength cryptography available (by default) in your JVM. Putting it another way, assuming you're using the official JVM from Oracle, and you happen to live in a nation against which the U.S. has leveled export restrictions for cryptography (and since Oracle is a United States company, it would be subject to these restrictions), then you could also assume in this case that you don't have unlimited strength available.

当然,不会阻止你建立自己的,从而给予你自己无限的力量,但根据你当地的法律,这可能是非法的。

Of course, that doesn't stop you from building your own, and thereby granting yourself unlimited strength, but depending on your local laws, that might be illegal.

本文概述了对其他国家出口的限制,来自美国。

This article outlines the restrictions on export to other nations, from the Unites States.

这篇关于检查Unlimited Cryptography是否可用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆