Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (102)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (322)
Collections:
Other Resources:
JDK 17 jdk.crypto.ec.jmod - Crypto EC Module
JDK 17 jdk.crypto.ec.jmod is the JMOD file for JDK 17 Crypto EC module.
JDK 17 Crypto EC module compiled class files are stored in \fyicenter\jdk-17.0.5\jmods\jdk.crypto.ec.jmod.
JDK 17 Crypto EC module compiled class files are also linked and stored in the \fyicenter\jdk-17.0.5\lib\modules JImage file.
JDK 17 Crypto EC module source code files are stored in \fyicenter\jdk-17.0.5\lib\src.zip\jdk.crypto.ec.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ sun/security/ec/ed/EdDSAKeyPairGenerator.java
/*
* Copyright (c) 2020, 2021, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package sun.security.ec.ed;
//import java.security.*;
import java.security.InvalidAlgorithmParameterException;
import java.security.InvalidKeyException;
import java.security.InvalidParameterException;
import java.security.KeyPair;
import java.security.KeyPairGeneratorSpi;
import java.security.NoSuchAlgorithmException;
import java.security.ProviderException;
import java.security.SecureRandom;
import java.security.spec.AlgorithmParameterSpec;
import java.security.spec.EdECPoint;
import java.security.spec.NamedParameterSpec;
import java.util.Arrays;
import sun.security.jca.JCAUtil;
import sun.security.util.SecurityProviderConstants;
/**
* Key pair generator for the EdDSA signature algorithm.
*/
public class EdDSAKeyPairGenerator extends KeyPairGeneratorSpi {
private SecureRandom random = null;
private EdDSAOperations ops = null;
private EdDSAParameters lockedParams = null;
public EdDSAKeyPairGenerator() {
initialize(SecurityProviderConstants.DEF_ED_KEY_SIZE, null);
}
private EdDSAKeyPairGenerator(NamedParameterSpec paramSpec) {
tryInitialize(paramSpec);
lockedParams = ops.getParameters();
}
private void tryInitialize(NamedParameterSpec paramSpec) {
try {
initialize(paramSpec, null);
} catch (InvalidAlgorithmParameterException ex) {
String name = paramSpec.getName();
throw new ProviderException(name + " not supported");
}
}
@Override
public void initialize(int keySize, SecureRandom random) {
EdDSAParameters params = EdDSAParameters.getBySize(
InvalidParameterException::new, keySize);
initializeImpl(params, random);
}
@Override
public void initialize(AlgorithmParameterSpec params, SecureRandom random)
throws InvalidAlgorithmParameterException {
EdDSAParameters edParams = EdDSAParameters.get(
InvalidAlgorithmParameterException::new, params);
try {
initializeImpl(edParams, random);
} catch (InvalidParameterException e) {
throw new InvalidAlgorithmParameterException(e);
}
}
private void initializeImpl(EdDSAParameters params, SecureRandom random) {
if (lockedParams != null && lockedParams != params) {
throw new InvalidParameterException("Parameters must be " +
lockedParams.getName());
}
try {
this.ops = new EdDSAOperations(params);
} catch (NoSuchAlgorithmException ex) {
throw new ProviderException(ex);
}
this.random = random == null ? JCAUtil.getSecureRandom() : random;
}
@Override
public KeyPair generateKeyPair() {
byte[] privateKey = ops.generatePrivate(random);
EdECPoint publicKey = ops.computePublic(privateKey);
try {
return new KeyPair(
new EdDSAPublicKeyImpl(ops.getParameters(), publicKey),
new EdDSAPrivateKeyImpl(ops.getParameters(), privateKey)
);
} catch (InvalidKeyException ex) {
throw new ProviderException(ex);
} finally {
Arrays.fill(privateKey, (byte)0);
}
}
public static class Ed25519 extends EdDSAKeyPairGenerator {
public Ed25519() {
super(NamedParameterSpec.ED25519);
}
}
public static class Ed448 extends EdDSAKeyPairGenerator {
public Ed448() {
super(NamedParameterSpec.ED448);
}
}
}
⏎ sun/security/ec/ed/EdDSAKeyPairGenerator.java
Or download all of them as a single archive file:
File name: jdk.crypto.ec-17.0.5-src.zip File size: 62834 bytes Release date: 2022-09-13 Download
⇒ JDK 17 jdk.dynalink.jmod - Dynamic Linking Module
2023-10-15, ≈14🔥, 0💬
Popular Posts:
Rhino JavaScript Java Library is an open-source implementation of JavaScript written entirely in Jav...
XML Serializer, Release 2.7.1, allows you to write out XML, HTML etc. as a stream of characters from...
This package is the backport of java.util.concurrent API, introduced in Java 5.0 and further refined...
Apache Commons Codec library provides implementations of common encoders and decoders such as Base64...
Java Servlet API 4.0.1 Source Code Files are important if you want to compile them with different JD...