Comments (9)
Possibly related to this: http://stackoverflow.com/questions/35633351/cant-decrypt-file-encrypted-with-openpgp-php-in-gnupg
Confirmed, this does not work here. Decryption fails (no valid encrypted PGP data) and encryption also (throws exception and crashes GPA).
The encrypt/decrypt (E) capability is missing.
http://www.hauke-laging.de/sicherheit/subkeys.en.html
E: encryption / decryption
pub 1024R/86CF75F5 erzeugt: 2016-02-26 verfällt: niemals Aufruf(usage): C
Vertrauen: unbekannt Gültigkeit: unbekannt
[ unbek.] (1). TEST
from openpgp-php.
Any update about this problem @singpolyma?
from openpgp-php.
I have tracked it down to these lines
The values from here seem to not be properly added, just the first value is actually used
openpgp-php/lib/openpgp_crypt_rsa.php
Line 157 in ff4bd67
All values are processed
Line 1194 in cefaef2
[1]=>
object(OpenPGP_SignaturePacket_KeyFlagsPacket)#28 (4) {
["tag"]=>
int(27)
["size"]=>
NULL
["data"]=>
NULL
["flags"]=>
array(...) {
https://tools.ietf.org/html/rfc4880#section-5.2.3.21
Also the public key is not shown in GPA, just the private key.
The generated public key contains also the pirvate key. Possibly this is caused by $pubm = clone($m);
which clones the secret key packet and replaces just the first packet. But there is still the one flags packet left (which should be different for the public key) and the public key still has the private key packets included in some places.
openpgp-php/examples/keygen.php
Line 29 in bcc9c92
from openpgp-php.
@meitar importing the public key should be possible with --allow-non-selfsigned-uid
see http://stackoverflow.com/questions/35633351/cant-decrypt-file-encrypted-with-openpgp-php-in-gnupg
I will take a look again at the code and the issue with the flags and provide a PR if possible.
from openpgp-php.
@DanielRuf Okay, but I'm not having any trouble importing the public key. It's generating a revocation certificate that I'm having trouble with (see above reference). :\
from openpgp-php.
Please test my latest version with 741fec2 and see if this helps you.
from openpgp-php.
@singpolyma The newest commits do create a key with the S (signing) capability and also the C (certify) capability. The previous keys generated with this library were created with only the C (certify) capability. So that's definitely a fix, if that's as intended.
However, as per @DanielRuf's question, this does not resolve the issue with manually creating a revocation certificate (described in #31). These latest commits do not affect that issue at all.
from openpgp-php.
@meitar are you using the example script to do they keygen? I specifically refer to the commit that fixes the keygen example to use the correct p/u values. This changed fixed revocation generation for me in gpg locally.
from openpgp-php.
I specifically refer to the commit that fixes the keygen example to use the correct p/u values.
Ah!! I'm sorry, I was looking only at commits in lib
and the dependencies.
You're right, using the correct p/q values enables me to create a revocation certificate as well. Thank you!
from openpgp-php.
Related Issues (20)
- Can't decrypt pgp ciphers from other clients HOT 1
- Encryption HOT 1
- PHP8 and thoughts on minimum PHP version HOT 2
- New tagged release version HOT 3
- Cant decrypt on CLI HOT 1
- Encrypt stream or chunks
- Not an asymmetrically encrypted message when trying to decrypt
- Support for phpseclib3 HOT 4
- Bump version to php 7.3? HOT 1
- Generated public keys cannot be imported into Thunderbird OpenPGP Key Manager HOT 6
- Need help with decrypting a file HOT 1
- getCipher algo number 1 HOT 1
- Please implement a "sop" (Stateless OpenPGP Command Line) interface HOT 2
- Multiple recipients when should be single HOT 3
- Error: Ciphertext representative out of range HOT 1
- Does this work out-the-box with laravel? HOT 9
- OpenPGP_PublicSubkeyPacket in SubKey exemple? HOT 1
- Documentation? HOT 1
- Cannot decrypt messages encoded with GPG
- encrypt and sign HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openpgp-php.