private-key

Digitally sign using client certificate in ASP.Net

匆匆过客 提交于 2019-12-02 03:40:20
I am trying to digitally sign information with a private key. I know how to do this on in a desktop client application with .Net, but am not sure how to do it in ASP.Net. It would be used on an intranet using IE8. If it is done via ASP.Net, I am guessing that the private key is not sent to the server when the user types in their certificate passowrd when going to the site (https, 2-way SSL), but am not sure. If there is no way to access the client private key on the server, then how can I sign something in the browser? Can I use javascript? Edit: I guess what would be helpful to know first is

Digitally sign using client certificate in ASP.Net

≡放荡痞女 提交于 2019-12-02 03:23:56
问题 I am trying to digitally sign information with a private key. I know how to do this on in a desktop client application with .Net, but am not sure how to do it in ASP.Net. It would be used on an intranet using IE8. If it is done via ASP.Net, I am guessing that the private key is not sent to the server when the user types in their certificate passowrd when going to the site (https, 2-way SSL), but am not sure. If there is no way to access the client private key on the server, then how can I

Why do I have to create a certificate request (CSR) from the private key?

别等时光非礼了梦想. 提交于 2019-12-02 02:26:19
I am trying to create a Certificate Request (CSR) from the below method where I need to give the private key, my understanding is that CSR needs/contains only the public key information with the other details about the requestor like Company Name, etc. But if extract the public key and pass while creating the CSR it throws the below error, So I am wondering why it requires a private key , although I understand private key contains the public key as well , Is it just because the public key is trusted when it's with the private key in the form of key-pair or something else ? openssl genrsa -out

Use a .p12 File from classpath for GoogleCredential

匆匆过客 提交于 2019-12-01 19:31:23
I am making a java command line application packaged in a single JAR file that uses some of Google's API. I need to set up a GoogleCredential object from a private key "Credentials.p12". GoogleCredential credential = new GoogleCredential.Builder() .setTransport(httpTransport) .setJsonFactory(jsonFactory) .setServiceAccountId("xxxxx@developer.gserviceaccount.com") .setServiceAccountScopes(Arrays.asList(DirectoryScopes.ADMIN_DIRECTORY_GROUP, DirectoryScopes.ADMIN_DIRECTORY_USER, DirectoryScopes.ADMIN_DIRECTORY_ORGUNIT)) .setServiceAccountUser(emailAccount) //THE CODE BELOW IS IMPORTANT: I need

SSL Connection, Windows Certificate Store and CAPI engine

血红的双手。 提交于 2019-12-01 08:57:28
I am creating an SSL connection using OpenSSL API. As we know in a SSL handshake, series of Certificate Authentication occurs for Server or Client. Now for client certificate authentication, the client's certificate and associated private key are stored in Windows Certificate Store . This certificate with private key is imported into the store after combining them into a pfx format and then that pfx file is imported to the windows Cert store. Now while importing this pfx file using mmc snap-in it asks whether we want to make the private key exportable or not. Now OpenSSL comes into picture for

Read private key in DER format java

孤人 提交于 2019-12-01 04:08:26
问题 I have the following code to read a private key in PKCS#8 format public void encryptHash(String hashToEncrypt, String pathOfKey, String Algorithm) { FileInputStream fis = null; byte[] encodedKey = null; try { File f = new File(pathOfKey); encodedKey = new byte[(int)f.length()]; fis = new FileInputStream(f); fis.read(encodedKey); fis.close(); KeyFactory kf = KeyFactory.getInstance("RSA"); PrivateKey privateKey = kf.generatePrivate(new PKCS8EncodedKeySpec(encodedKey)); Signature rsaSigner =

openssl_pkey_new() throwing errors — Proper openssl.cnf setup for php

大城市里の小女人 提交于 2019-12-01 03:36:16
**Okay, It's become clear that this issue is an issue related with the setup of openssl on the Linux server and how to properly setup a custom openssl.cnf file. I am not looking for anything complicated but I need a front-end to be able to create self-signed client certificates for authentication to my webservice. So I need to be able to use my CA to create intermediate CAs for client companies and then allow them a secure interface to issue client certificates for their employees. Logins are based on whether you belong to a specific intermediate CA and that your certificate or the

Get public key from private in Java

风流意气都作罢 提交于 2019-12-01 02:51:10
I remember do this long time ago with OpenSSL, but I want to know if it's possible and how, I've never used Cryptography on java. You cannot generate either key directly from the other. It is mathematically impossible. If you had a key blob that contained both the public and private keys, you could extract either one of them with relative ease. EDIT, 2017: Many years and a much better understanding of crypto later, and it's now clear to me that this answer isn't really correct. To quote Wikipedia: The public key consists of the modulus n and the public (or encryption) exponent e. The private

JSch how to use with PuTTY private key

扶醉桌前 提交于 2019-12-01 01:04:38
I'm trying to use JSch with a private key configuration. I've generated a public and private key using PuTTYgen but am unsure what to do with both of the files. Which key (public/private) needs transferring to the server? First, you need to register your PuTTYgen-generated public key on the server. See Getting ready for public key authentication or (my) Set up SSH public key authentication . And finally see Can we use JSch for SSH key-based communication? for details on using the private key in JSch. Make sure you use the latest version of JSch, as older versions do not support the .ppk format

Restore RSA private key by modulus, public and private exponents using Java Security

落爺英雄遲暮 提交于 2019-12-01 00:20:33
I'm trying to find Java (native or BouncyCastle provider) implementation for generating a RSA private key in PKCS#1 using given params {e,n,d}. There is paper by Dan Boneh that describes an algorithm for doing so. The solution is available in PyCrypto (Python), as well as there is a standalone utility posted by Mounir IDRASSI that converts RSA keys between the SFM format (n,e,d) and CRT format (p,q,dp,dq,u), and the other way around. However I was not able to find anything ready to use for Java. Update: I found such implementation at https://github.com/martinpaljak/RSAKeyConverter/blob/master