public static java . security . KeyPair generateLongTermRevocationKey ( ) { try { KeyPairGenerator keyGen = KeyPairGenerator . getInstance ( "EC" ) ; SecureRandom random = new SecureRandom ( ) ; AlgorithmParameterSpec params = new ECGenParameterSpec ( "secp384r1" ) ; keyGen . initialize ( params , random ) ; return keyGen . generateKeyPair ( ) ; } catch ( NoSuchAlgorithmException | InvalidAlgorithmParameterException e ) { throw new RuntimeException ( "Error during the LTRevocation key. Invalid algorithm" ) ; } }
Generate a long term ECDSA key pair used for revocation