publickey

[python] RSA encryption

I am doing on my project and there is about port knocking. I have 3 files that separated in server side and client. In the server contains : portknocking server as a daemon and configuration file [contains sequence of port that must be satisfied and many other configuration detail] In the client contains : portknocking client. Is there ...

Ruby net-ssh: How to authenticate with pubkey using a gateway

Hello, I am trying to run a script in several machines I have at work, to gather some information about them, such as which OS they're running, what services run on them, some configurations, etc. I have a machine on which I log before ssh-ing to any of the other machines, because of the public key setup it has. From there, I can ssh in...

Can you help me get my head around openssl public key encryption with rsa.h in c++?

Hi there, I am trying to get my head around public key encryption using the openssl implementation of rsa in C++. Can you help? So far these are my thoughts (please do correct if necessary) Alice is connected to Bob over a network Alice and Bob want secure communications Alice generates a public / private key pair and sends public key...

Generating an RSA Key Pair with Erlang?

Erlang has a crypto function which generates public private keys (documentation copied below). However the documentation seems vague and I can't find any example code that describes how to generate the shared prime number or the generator. Can someone post an example that generates a public/private key pair? Thanks in advance for any ...

Certificate Authority vs Stored public key

Hello, I'm developing a J2ME app which securely connects to a server to login. I'm having a lot of difficulty in setting up the SSL between the two so I thought of a simpler solution and I'm hoping you can give your views on it. The J2ME Midlet is shipped WITH the server's public key, on connect a message (username, password hash and r...

Do I need captcha public key and/or private key for localhost?

I am developing locally with PHP on Xampp. I am trying to use recaptcha. Do I need public and/or private key? Thanks in advance. ...

Convert public/private key strings to RSA xmlstring

My partner gave me an RSA public key that looks like this: MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCSK+roLfbUYf6PGNIf6Ej8R5EqSTjlRABTu7T0FxR/B6iurI80jktW9+zKu4jFnFJ8oYx24raD3x5KhJZR2VCBEEbtYpPq/5E25v+LIkFbx8sNkMvEACZdAWyeQcEookGfKDER4PGrB35bntcO2SnItTZc8BOI3jAOBXTeBO16NwIDAQAB I know that there are Modulus and Exponent in a public key,...

Setup SFTP to use public-key authentication

How do you setup server to server SFTP to use public-key authentication instead of user account and password? ...

What is the difference between a cer, pvk, and pfx file?

What is the difference between a cer, pvk, and pfx file? EDIT: Also, which files do I keep and which am I expected to give to my counter-parties? ...

using public/private keys in javascript

Hi, I need to send an ajax POST request to my server. I'll need to make sure that the request originated from the script itself, and not from a user writing the request him/her self. Is there any secure way to do this? Can the script sign or encode the POST request, later to be decrypted by the server's private key? and can I somehow p...

Is there a way to alter a public key in a way that the decryption can still be done with the private key after some alteration?

In an asymetric encryption scheme, I was wondering if it's possible to achieve the following: Bob sends to Alice his public key Alice alters Bob's public key and encrypt some document with it Alice sends the encrypted document to Bob Bob retrieve the document but can't decrypt it with his private key Later, Alice sends some additional ...

How can I use openssl(*from the CLI) to encrypt a message using my public key and then decrypt it using my private key?

Here is what I've tried: Encrypt message w/ my public key openssl enc -aes-256-cbc -salt -kfile key.pub -in message.txt -out message.enc Decrypt message using my private key openssl enc -d -aes-256-cbc -salt -in message.enc -pass file:mykey.pem Error from decryption bad decrypt 452:error:06065064:digital envelope routines:EVP_De...

Import .pem public and private keys to JKS keystore

Hi, I have public and private keys in separate .pem files that I would need to get into a JKS keystore somehow. Tried using the -import command in KeyTool for this, which gives an "not an X.509 certificate" error. I'm guessing the solution has to do with OpenSSL, but I'm not entirely sure what to do with it. Would really appreciate a...

What exactly is a "key container"?

Is it something specific, with a definite structure, or just an arbitrary data file with some form of encryption to hold keys, and potentially other secret information? Can someone please explain the term or point me to a link. ...

Decrypt file with public key

I have encrypted file and public key. How can I decrypt it from app without installing certificates? file public.key looks like "e+ztydr5GG7saZyrIOtSWGQgHlQbuFn1IVlIIggPIWuLUNTOqN0Y..." Here are some code: NSString* filePath = [[NSBundle mainBundle] pathForResource:@"public" ofType:@"key"]; NSData* publicKeyData = [NSData dataWithCo...

pgp key information

can someone show a description of the information of what a pgp looks like if only the descriptions were there but not the actual information? something like (i dont remember if the values are correct): packet-type[4 bits], total length in bytes[16 bits], packet version type [4 bits], creation-time[32 bits], encryption-algori...

Reading PGP key information

can someone show a description of the information of what a pgp looks like if only the descriptions were there but not the actual information? something like (i dont remember if the values are correct): packet-type[4 bits], total length in bytes[16 bits], packet version type [4 bits], creation-time[32 bits], encryption-algori...

Maven won't use public key to deploy

I'm using SSH to deploy my Java artifacts to a server. I have the keys set up so that I can interactively SSH to the server without requiring a password, but when I try to run the "mvn deploy" or "mvn release:perform" commands, it hangs (at what I assume is the password prompt). My ~/.m2/settings.xml file contains the username for the s...

read java.security.key stored as object inside a file which is in jar

I saved a PublicKey instance in a file using ObjectOutputStream. This file is then stored inside a jar file which is then loaded by JBoss. I'm trying to read this file but it throws me an exception telling that it's not serializable. Here is the code : InputStream input = KeyLoader.class.getClassLoader().getResourceAsStream(resource); ...

is this a correct way to generate rsa keys?

is this code going to give me correct values for RSA keys (assuming that the other functions are correct)? im having trouble getting my program to decrypt properly, as in certain blocks are not decrypting properly this is in python: import random def keygen(bits): p = q = 3 while p == q: p = random.randint(2**(bits/2-2)...