publickey

OpenSSL and generating CSRs at client side

I need a favour from you. My infrastructure is IIS 6.0 and windows server 2003. I need to investigate the use of OpenSSL and the construction of media that can be sent to end users, allowing them to generate CSRs, as well as produce documentation to support the signing of the CSR. What I mean is, I need to send a CD to the end user wit...

Clientside CSR generation using openSSL

Hello All, I am sending an openSSL script to the client along with my companies PublicKey. The idea is, client has to run a batch file which it will run some openSSL commands in the background and generate his privatekey and csr file. While generating the CSR file I need to supply a config file to the openSSL req command. example ...

Any tutorials on public key encryption in java?

I've been able find information on symmetric encryption and hashing but I've been having quite a bit of trouble finding much information on any sort of public key encryption for java. What I'd like to do is make a very simple proof of concept program that takes a string ( or a file I suppose), encrypts it with a public key and then decry...

Code golf: Diffie-Hellman key exchange

Back in the ITAR era, there was a popular sig that performed Diffie-Hellman key exchange: #!/usr/bin/perl -- -export-a-crypto-system-sig Diffie-Hellman-2-lines ($g,$e,$m)=@ARGV,$m||die"$0 gen exp mod\n";print`echo "16dio1[d2%Sa2/d0<X+d *La1=z\U$m%0]SX$e"[$g*]\EszlXx+p|dc` With a modern dc, this can be reduced quite a bit to: dc -e '1...

Create a second ssh key

Hi, I need to create a script that automatically setup a ssh tunnel. I think that a dedicated ssh key without password is a good start but I couldn't find if this is possible and how to do it. This key should have limited privileges (only set the tunnel up) but I need another private key (with a password) for myself. Thanks ! ...

RSA Encryption public key not returned from container???

I feel like what I am trying to do is very simple. But for some reason it doesn't want to work: Here is a complete code snippet to test what I am trying to do: using System; using System.Xml; using System.Security.Cryptography; using System.Security.Cryptography.Xml; namespace XmlCryptographySendingTest { class Program { ...

Is SSH logging capabilities equivalent to su logging for private/public key authentication?

Here at work, we have a non-root shared login account on UNIX that is used to admin a particular application. The policy is to not allow direct logins to the shared account; you must login as yourself and use the "su" command to change over to the shared account. This is for logging/security purposes. I've started using SSH public/priv...

Public key or Diffie-Hellman Key Exchange Algorithm

Consider and client server scenario and you got two options: You can include Server's Public Key in Client and perform the exchange. You can use Diffie Hellman KeyExchange Algorithm to handshake and then exchange the key. Which one is more secure way? also if public key will come from store say from Client CA store? would it be more ...

python+encryption: Encrypting session key using public key

I want to encrypt the session key using the public key. How does the PGP software do this? Can somebody specify the procedure or function of encryption in Python? ...

Generating REALLY big primes

I'm playing around and trying to write an implementation of RSA. The problem is that I'm stuck on generating the massive prime numbers that are involved in generating a key pair. Could someone point me to a fast way to generate huge primes/probable primes? ...

public key crytography implementation

Hi Guys, I have been using the PHP mcrypt module for encrypting sensitive data at my company. This has been working well. However, I have been requested to create a new master password which should be able to decrypt any data. The problem is that this master password would have to be hardcoded in a script file. Please correct me if I am...

Find assembly's public key via code

How can I find a .NET assembly's public key via code? From the command line, I can use sn -Tp assemblyName to find the public key. What's the equivalent (c# or VB) in code? ...

Verifying a signature in java using a certificates public key

I'm looking to convert some C# code to the equivalent in Java. The C# code takes some string content, and a signature (generated using the private key, on a seperate machine) and combined with the public key it verifies the signature matches, providing a level of assurance that the request has not been tampered with. public bool Veri...

How secure is this architecture?

Hi, I'm building a system that need to collect some user sensitive data via secured web connection, store it securely on the server for later automated decryption and reuse. System should also allow user to view some part of the secured data (e.g., *****ze) and/or change it completely via web. System should provide reasonable level of s...

How to communicate AES initialization Vector to client for hybrid cryptosystem.

I need to implemented security for client-server communication. I have implemented the following hybrid cryptosystem: http://en.wikipedia.org/wiki/Hybrid%5Fcryptosystem To encrypt a message addressed to Alice in a hybrid cryptosystem, Bob does the following: Obtains Alice's public key. Generates a fresh symmetric key for the data enca...

Permission denied (publickey,keyboard-interactive).

I tried to connect to planetlab node using ssh. It throws me error like Permission denied (publickey,keyboard-interactive). What does this mean? Here is the verbose of the exception. > OpenSSH_5.1p1 Debian-5ubuntu1, OpenSSL > 0.9.8g 19 Oct 2007 debug1: Reading configuration data /etc/ssh/ssh_config > debug1: Applying options for * debug...

iPhone: How to create a SecKeyRef from a public key file (PEM)

In order to send and receive encrypted messages from/to the iPhone I need to read a public key (server's public key) PEM file and create a SecKeyRef (later I could even store it on the keychain in order not to create it again). This is my current workflow: On the server: Create a P12 file with the user's certificate and private key. S...

how to read a RSA public key from a pem file OR xml file

Hello, I have a simple thing to do : I want to encryt data using AES algorythm and a key contained in a pem file, like shown on the page : http://msdn.microsoft.com/en-us/library/sb7w85t6.aspx In this example, a new encryption key is created every time the function is run. But I need to read this key from either a pem file or an xml...

git push heroku master permission denied on VISTA

(Using Vista)I'm trying to clone an app from my GitHub Repository and push it into Heroku. Okay, so I've tried to create an SSH key so many times with this: `ssh-keygen -t rsa` It seems to go perfectly. I have it on my C:/Users/***/.ssh folder. I now try to clone an app i forked in GitHub. When I try to clone it on the rails_apps dir...

Simple use of RSACryptoServiceProvider KeyPassword fails

I want to protect my RSA private key with a password (who wouldn't) but the following C# fails: SecureString pw = new SecureString(); pw.AppendChar('x'); CspParameters prms = new CspParameters(); prms.KeyPassword = pw; RSACryptoServiceProvider crypto = new RSACryptoServiceProvider(prms); byte[] encrypted = crypto.Encrypt(Encoding.ASCII...