You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Note**: The current `AESCryptoServiceProvider::seal()` method uses `openssl_seal()` which only supports RSA keys. EC-compatible hybrid encryption would require ECDH key exchange implementation.
64
+
65
+
### New EC Classes Available
66
+
```php
67
+
// Dedicated EC classes for explicit EC usage
68
+
$ecParams = new ECParameters();
69
+
$ecCrypto = new ECCryptoServiceProvider();
70
+
```
71
+
26
72
## Development
27
73
28
74
This project contains dev container. To start development build container
@@ -69,22 +115,76 @@ it is generated for each encryption, and then it is part of encrypted data.
69
115
70
116
### Asymmetrical encryption
71
117
72
-
Asymmetrical encryption using two different keys. One for encryption and one for decryption. They are mostly known as
73
-
private and public keys. The public one is that you want to share to someone. With public key you can encrypt data
74
-
(or someone who want to send you message) and with private key you can decrypt and read data. Private key can be
75
-
protected by password. Here is example
118
+
⚠️ **Important Change**: Default key generation now uses **EC (Elliptic Curve) keys** instead of RSA keys for better performance and security.
119
+
120
+
#### Digital Signatures (Works with both RSA and EC)
121
+
122
+
Digital signatures work seamlessly with both RSA and EC keys:
123
+
124
+
```php
125
+
$plainText = "This is going to be signed!";
126
+
$parameters = new RSAParameters();
127
+
$parameters->generateKeys("passphrase"); // Now generates EC keys by default
128
+
129
+
$crypto = new RSACryptoServiceProvider();
130
+
$crypto->setParameters($parameters);
131
+
132
+
// Signing and verification work with both RSA and EC keys
0 commit comments