라벨이 PKI인 게시물 표시

P12 <--> JKS

keytool -importkeystore -srckeystore superadmin.p12 -srcstoretype PKCS12 -deststoretype JKS -destkeystore superadmin.jks http://blog.ejbca.org/2008/02/converting-keystores-between-jks-and.html

Key generation

package cccc; import java.math.BigInteger; import java.security.InvalidAlgorithmParameterException; import java.security.KeyPair; import java.security.KeyPairGenerator; import java.security.NoSuchAlgorithmException; import java.security.NoSuchProviderException; import java.security.PrivateKey; import java.security.PublicKey; import java.security.SecureRandom; import java.security.Security; //import java.util.Base64; import org.apache.commons.codec.binary.Base64; import org.bouncycastle.asn1.pkcs.PrivateKeyInfo; import org.bouncycastle.crypto.util.PrivateKeyInfoFactory; import org.bouncycastle.jce.provider.BouncyCastleProvider; import org.bouncycastle.math.ec.ECCurve; //import ; import org.bouncycastle.util.encoders.Hex; import org.bouncycastle.jce.spec.ECParameterSpec; public class vvv { public static void main(String[] args) throws NoSuchAlgorithmException, NoSuchProviderException, InvalidAlgorithmParameterException { Security.addProvider(new BouncyC...