Is Bouncy Castle API (http://bouncycastle.org/java.html) Thread Safe ? Especially,
org.bouncycastle.crypto.paddings.PaddedBufferedBlockCipher
org.bouncycastle.crypto.paddings.PKCS7Padding
org.bouncycastle.crypto.engines.AESFastEngine
org.bouncycastle.crypto.modes.CBCBlockCipher
I am planning to write a singleton Spring bean for basic l...
What is the best method of performing an scp transfer via the Java programming language? It seems I may be able to perform this via JSSE, JSch or the bouncy castle java libraries. None of these solutions seem to have an easy answer.
...
I've been trying to make sense of the BouncyCastle cryptography APIs for Java. Unfortunately, I'm finding Java cryptography in general to be so obscured by service provider interfaces and jargon that I can't wrap my head around what anything actually does. I've tried reading the necessary documentation repeatedly but it just stays incomp...
We need to PGP encrypt files and send them over FTP to a third party. The files are encrypted with the DH/DSS public key of the third party and signed with our private key.
The third party have our public key and their own private key. The encryption/decryption works, but the third party are getting warnings when they try to verify our ...
Hello All,
I have made jar file for my application. One of the class of my application uses BouncyCastleProvider class of BC jar.
I have created one folder "lib" in the same parent folder where my application jar is residing.
I have changed my machine CLASSPATH to point to this new lib folder. But when I run my application it gives me...
I am looking for open source JCE libraries that implement some of the more esoteric encryption algorithms so that I can study their implementation. I would be especially interested in ones that implement Identity Based Encryption (IBE) as published by Stanford.
...
I have a function that generates a BouncyCastle RSA key pair. I need to encrypt the private key and then store the encrypted private and public keys into separate SQL2008 database fields.
I am using the following to get the keypair:
private static AsymmetricCipherKeyPair createASymRandomCipher()
{
RsaKeyPairGenerator r = new RsaKeyPai...
Is there a way to generate a 128-bit key pair suitable for encryption using Sun's keytool program? It seems that the algorithms available in http://java.sun.com/javase/6/docs/technotes/guides/security/StandardNames.html#KeyPairGenerator are either not supported or do not allow keys shorter than 512 bits.
The key pair will be used with ...
hi i need to pass the public key and private key in string format for encryption and decryption in pgp.i ve generated the keys like this but i am not able to use those.so can anyone tell me how to get the public key and private key in string format from this.and also the rsakeygenerator has not given the passphrase for private key. so wh...
So after CodingHorror's fun with encryption and the thrashing comments, we are reconsidering doing our own encryption.
In this case, we need to pass some information that identifies a user to a 3rd party service which will then call back to a service on our website with the information plus a hash.
The 2nd service looks up info on tha...
hi can anyone tell me how to generate pgp public, private and passphrase using bouncy castle in c#?
...
I'm using RSACryptoServiceProvider I've generated public key and private key. The keys generated by it are in the following format:
Public key:
<RSAKeyValue>
<Modulus>m9bAoh2...eGNKYs=</Modulus>
<Exponent>AQAB</Exponent>
</RSAKeyValue>
Private key:
<RSAKeyValue>
<Modulus>m9bAo...ZAIeGNKYs=</Modulus>
<Exponent>AQAB<...
Hi,
Trying to request a timestamp (RFC 3161) by using BouncyCastle and connecting to http://timestamping.edelweb.fr/service/tsp. I do get a TimestampResponse back from the server but it seems to be without an actual date.
This is the code:
public static void main(String[] args) {
String ocspUrl = "http://timestamping.edelweb.fr/se...
my code is as below while running it i got the error as shown,
// TODO Auto-generated method stub
String user = request.getParameter("user");
HttpSession session = request.getSession();
CryptoEngine inCipher = (CryptoEngine) session
.getAttribute("inCipher");
CryptoEngine outCipher = (CryptoEngine) session
.getAttrib...
Cryptography newbie here... I'm trying to do 128-bit encryption using BouncyCastle with the code below.
import java.io.BufferedOutputStream;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.security.KeyStore;
import java.security.Security;
import java....
I'm creating a certificate distribution system to keep track of clients and stuff.
What happens is:
Client send CSR to Server
Server checks and signs certificate
Server sends Signed certificate to Client
Client puts Signed certificate plus Private key in Windows store.
So on the client this happens:
//Pseudo Server Object:
Server s...
I am decrypting an XML file from the file system using Bouncy Castle. I output the decrypted text and get a fatal error SAXParseException on the very last byte of data. Below is my decryption method and the setup of the cipher object.
I was initially using cipher streams, and everything worked perfect (commented out code was my stream)...
I am trying to encrypt data with a password and store it inside a ASN.1 encoded CMS message (using C# and BouncyCastle 1.4)
The code I have seems to have two problems:
the data does not seem to be signed with a HMAC, so when I tamper with the encodedData (by enabling the commented out line), the decryption still succeeds.
when I decry...
I'm trying to asymetrically encrypt a message of arbitrary length with bouncycastle. (1.4+ with C#)
This is the code I have right now. It is supposed to (but doesn't) generate a CMS message where the data itself is encrypted with AES256 with a random key and the key is encrypted with the public key from keyPair.
keyPair is an RSA-Key ...
We have a Java application that stores RSA public keys and allows a user to encrypt a short stream of information with any of the keys. The application also allows the user to import a new key certificate into the keystore. When we load the certificate from a file, we want to use the common name (CN) as the alias. Here is the problem:
C...