检查Unlimited Cryptography是否可用

编程入门 行业动态 更新时间:2024-10-25 16:21:21
本文介绍了检查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.

这是一篇参考文章,其中列出了截至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是否可用

本文发布于:2023-11-16 19:43:23,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1607199.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Unlimited   Cryptography

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!