openpgp

Using BCPG public key in ObjectivePGP for generating PGPKey its return nil

被刻印的时光 ゝ 提交于 2019-12-11 17:25:08
问题 My Public key : -----BEGIN PGP SIGNATURE----- Version: BCPG v1.48 lQH+BFomf0kDBADUrV1KFuGFxvRhA7yCO07q5vtvKTjnP4wRn5KyXMyjYX2R5rvGkQkpWwBfzGCxMA+ieeW5mWFrNFod4A6wXGzXiiEZ3/i4EfvyipKk38sLVdW8I3sux1lnjp4t+6p1RTAVAwx0yWGjNHlLcbwhtFNyoIW1fxUckVZwW3PJrJm2owARAQAB/gMDAkpUpa7K3etCYNSXyy/c0CfQ1fMVnWtls9UNiLyj8Hi3qyaBK0E942xZQkiq60qCirnPtWTsndKkMnHuGcOVSusYwP20aKj2Z4vrfKAtSx1CoJVPtk0M/qt/cbUQqpkFrow6RBxCI5k/6xaxK+174WtEQRSD/Dzr99jPBdbI8zYB/1Nzj7uFZPci0i8x04TzR8aSFx5vTXc9v5nSEYUoNd

PGP Encryption with Apache Camel

强颜欢笑 提交于 2019-12-11 16:31:24
问题 I am trying to encrypt and decrypt a file using PGP Encryption/Decryption methodology with Apache Camel. Further I have installed Kleopatra to generate the private and public keys. Using Kleopatra i have generated my keys successfully. The secret key and public keys are in ".asc" extension. Below is the piece of code i am using to encrypt the file import org.apache.camel.CamelContext; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.impl.DefaultCamelContext; public class

GnuPG/PGP and SSL: Sharing the same private key?

。_饼干妹妹 提交于 2019-12-08 19:10:44
问题 I'm trying to sort out my use of digital signatures and encryption. I understand that there are 2 main ways to do this: the PGP way and the SSL way. What I would like to know if it's possible to use the same private key for both SSL certificate and GnuPG, providing that this is a RSA 2048 bit key. I already have an SSL certificate signed by a CA, so I was hoping to use that certificate's private key as the GnuPG master private key. I know that we can't make assertions between the SSL and

Go - Golang openpg - Create Key pair and create signature

廉价感情. 提交于 2019-12-07 09:46:19
问题 I'm currently working on openpgp in combination with golang. I use the following code to generate a new keypair and create a self-signature on the resulting public key: package main import ( "bytes" "crypto" "time" "golang.org/x/crypto/openpgp" "golang.org/x/crypto/openpgp/armor" "golang.org/x/crypto/openpgp/packet" "fmt" ) //Create ASscii Armor from openpgp.Entity func PubEntToAsciiArmor(pubEnt *openpgp.Entity) (asciiEntity string) { gotWriter := bytes.NewBuffer(nil) wr, errEncode := armor

Recommendations for Java + OpenPGP?

心已入冬 提交于 2019-12-07 02:32:28
问题 I want to develop a small OpenPGP client and I'm searching for a Java library for OpenPGP. Are there any (open source) recommendations for this approach? Cryptix.org does not seem alive anymore... 回答1: I found the BouncyCastle library, for Java and C#. I haven't any experiences with it. I will try it and report here. It provides: A lightweight cryptography API for Java and C#. A provider for the Java Cryptography Extension and the Java Cryptography Architecture. A clean room implementation of

Batch encrypt with public key using Gpg4win command line

回眸只為那壹抹淺笑 提交于 2019-12-06 01:54:52
We are setting up our first EDI system that relies on incoming and outgoing file encryption using OpenPGP. The incoming files that are encrypted with our public key, we can successfully decrypt using our private key using Gpg4win's command line option: gpg --batch --passphrase "SOME_KEY" --decrypt-files "%decryptingdir%\*.pgp" What I now need to do, is the reverse, and encrypt the outgoing files using our partners public key. I have been unable to find any command line documentation around batch encryption using a public key. I assumed it would be something in the order of: gpg --batch -

How to use GnuPG inside Docker containers, as it is missing entropy?

纵饮孤独 提交于 2019-12-05 17:59:57
问题 I need to dockerize an apt repository. The packages in it need to be signed, which is currently done by aptly publish snapshot -distribution="stable" -gpg-key="<key id>" my-snapshot Before that a key needs to be created using gpg --gen-key . But this way the private key will be crated inside the docker image, which doesn't seem to be a good practice. Besides, id doesn't even work; running gpg --gen-key --batch <gpg.in gets stuck: Not enough random bytes available. Please do some other work to

Go - Golang openpg - Create Key pair and create signature

…衆ロ難τιáo~ 提交于 2019-12-05 15:56:01
I'm currently working on openpgp in combination with golang. I use the following code to generate a new keypair and create a self-signature on the resulting public key: package main import ( "bytes" "crypto" "time" "golang.org/x/crypto/openpgp" "golang.org/x/crypto/openpgp/armor" "golang.org/x/crypto/openpgp/packet" "fmt" ) //Create ASscii Armor from openpgp.Entity func PubEntToAsciiArmor(pubEnt *openpgp.Entity) (asciiEntity string) { gotWriter := bytes.NewBuffer(nil) wr, errEncode := armor.Encode(gotWriter, openpgp.PublicKeyType, nil) if errEncode != nil { fmt.Println("Encoding Armor ",

PGP data encryption for use with Yubico OpenPGP Smart Card

徘徊边缘 提交于 2019-12-05 14:27:31
问题 I'm trying to implement PGP encryption based on Yubikey NEO OpenPGP Smart Card applet in a Java application. It seems to be a dark art and is not easy to google this stuff but here is where I got so far: The card is initialized, keys are generated using gpg tool. It generally works. I have my public key in .asc format and managed to load it into org.bouncycastle.openpgp Connect to the smart card in the USB dongle using javax.smartcardio APIs. Select the OpenPGP applet val pgpAID = bytes(0xD2,

OpenPGP/X.509 bridge: how to verify public key?

岁酱吖の 提交于 2019-12-05 14:06:59
I'd like to use OpenPGP authentication over TLS , but lack of implementations made me use a temporary solution: an OpenPGP/X.509 bridge certificate. The approach is very similar to the approach used in Foaf: https://svn.java.net/svn/sommer~svn/trunk/misc/FoafServer/pgpx509/src/net/java/dev/sommer/foafserver/utils/PgpX509Bridge.java Basically, you create a certificate request starting from a converted PGP private key, including your converted PGP public key into the certificate request. Then you sign the request with your converted PGP private key. I'm using the word " converted " because