Commit Graph

31 Commits

Author SHA1 Message Date
Deon George
9936e839a4 Update objects to use __toString() 2020-06-24 22:37:14 +10:00
Deon George
358f28273c Updates to pass unit testing 2020-06-18 22:03:56 +10:00
Stephen Paul Weber
d27d30a352
Implement encryptSecretKey
Allow encrypting a decrypted secret key, which is especially useful for
generating a new encrypted secret key.  Defaults to AES256, S2K
iter+salt SHA512, always uses s2k_useage 254 with sha1 integrity
protection of the encrypted key material.

Also add an example to parallel keygen.php that generates a key and then
encrypts it with a passphrase.
2019-09-10 21:31:06 -05:00
Stephen Paul Weber
752d80f14a S2K salt is *always* 8 bytes
Closes #33
2018-07-25 15:04:49 -05:00
Stephen Paul Weber
aeb919abc3 Whitespace 2018-07-25 14:37:07 -05:00
Stephen Paul Weber
43497a15c0 Use OpenSSL for CAST5
Mcrypt is deprecated, so use OpenSSL when we can, mcrypt when we can't.
2018-07-25 14:08:00 -05:00
Stephen Paul Weber
5a6b605710 Support Twofish and Blowfish 2018-07-25 14:07:16 -05:00
Stephen Paul Weber
498e60602b If session decryption fails, return NULL
Otherwise it returns false, we try to unpack that, and generally bad
things happen.
2018-07-25 09:57:33 -05:00
Stephen Paul Weber
413741fa84 Throw more helpful exception when already decrypted 2018-07-25 09:56:57 -05:00
Stefan Vetsch
9d6d736a5d Add newline before end-of-file (PSR-2) 2015-03-15 21:55:40 +01:00
Stefan Vetsch
ec8df93d19 Don't make a scene if there is no autoload.php (if someone isn't using composer). 2015-03-14 17:17:28 +01:00
Stefan Vetsch
ae21dd0f56 Make autoload work for phpunit tests 2015-03-14 10:59:21 +01:00
Stephen Paul Weber
d2913ccb8a Add support for CAST5 using mcrypt 2013-09-14 13:17:30 -05:00
Stephen Paul Weber
82ed7d85bd Rename symmetric encrypt/decrypt class
I'm going to make this one more generic than one library, and have it
support ciphers based on what libraries are available, so this more
generic name is appropriate.
2013-09-14 11:36:58 -05:00
Stephen Paul Weber
778c83dbc3 Better pubring.gpg 2013-02-18 18:41:11 -05:00
Stephen Paul Weber
7d776fd605 Encryption support 2013-01-26 17:01:26 -05:00
Stephen Paul Weber
a56799955f Decrypt secret key 2013-01-26 14:55:51 -05:00
Stephen Paul Weber
ae062433b7 Fix for PHP 5.3 grammar 2013-01-26 14:15:09 -05:00
Stephen Paul Weber
cd15aec6f9 Asymmetric decryption 2013-01-26 14:00:00 -05:00
Stephen Paul Weber
641c07835b Support session keys 2013-01-26 11:26:55 -05:00
Stephen Paul Weber
8c60f4e37b Support the no-MDC (resync) case 2013-01-26 11:17:11 -05:00
Stephen Paul Weber
567b18c1b2 Support 3DES 2013-01-26 11:08:18 -05:00
Stephen Paul Weber
bf8201f432 Start work on decryption 2013-01-21 18:18:41 -05:00
Stephen Paul Weber
06cf887846 Forgot these data files 2013-01-21 16:00:18 -05:00
Stephen Paul Weber
dffa0ecaa2 Generalize S2K support, and support SymmetricSessionKeyPacket 2013-01-21 15:20:23 -05:00
Stephen Paul Weber
74afee6266 Test signing at all 2013-01-20 22:15:49 -05:00
Stephen Paul Weber
4263d03188 Restructure signing code
All sorts of signatures can be verified now, and it is easier to extract
information from the verified signature packets.
2013-01-20 21:44:33 -05:00
Stephen Paul Weber
22585344c0 Message signature verification tests 2013-01-20 19:00:49 -05:00
Stephen Paul Weber
995a9d7840 Fingerprint tests 2013-01-20 17:51:37 -05:00
Stephen Paul Weber
c5600d2812 Enable meat of tests, all but one pass 2013-01-20 16:49:19 -05:00
Stephen Paul Weber
5cba4f2697 Import Serialization tests from OpenPGP-Haskell 2013-01-20 14:41:37 -05:00