DH密钥对生成时间在Android密钥、时间、DH、Android

2023-09-05 01:26:56 作者:自由如风

这是我使用生成一个密钥对DH的code:

This is the code that I'm using to generate a DH keypair:

KeyPairGenerator keyGen = KeyPairGenerator.getInstance("DH");
keyGen.initialize(1024, new SecureRandom());
KeyPair ackp = keyGen.generateKeyPair();

(没有需要的try / catch,当然)。

(without the needed try/catch, of course).

我已经做了这样的运行code反复和不同的密钥大小(从128特别斜坡了一个128步至1024 1024将所需的大小一些测试。

I've done some tests running such code iteratively and varying the key size (in particular ramping up from 128 with a 128 step up to 1024. 1024 would be the desired size.

首先,运行的每个大小代10次,对结果有一些最起码的标准偏差给出结果的高波动,平均而言,无论如何,所需的时间用于创建密钥( 1024位 )是:683027ms,这轮高达约