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
Copy file name to clipboardExpand all lines: blog/26-04-26/x509-certificates-in-js---encrypt-decrypt-data/x509-certificates-in-js---encrypt-decrypt-data.html
+128-6Lines changed: 128 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -81,16 +81,42 @@ <h1 class=title>
81
81
82
82
<divclass=description>
83
83
<p>
84
-
This blog post describes using x509 certificates to encrypt and decrypt data in a javascript environment. This
84
+
This blog post describes using x509 certificates to encrypt and decrypt data in javascript environments. This
85
85
can be useful since the public certificate can be made available publicly, even sent via an insecure communication
86
86
channel, this public certificate can be used to encrypt data, the encrypted data can be sent to the holder
87
87
of the private key, who can subsequently decode the encrypted data using the private key.
88
+
<br>
89
+
If two parties want to have a bi-directional encrypted communication, they can both send each other their
90
+
public certificates.
88
91
</p>
92
+
</div>
93
+
94
+
95
+
<divclass=blog-text>
96
+
<h4>
97
+
notes :
98
+
</h4>
89
99
<p>
90
-
Node.js supports both PKCS#1 and PKCS#8 private keys, while browsers only support PKCS#8.
91
-
This difference comes from how each environment exposes cryptography: Node wraps OpenSSL
92
-
(very flexible), while browsers expose WebCrypto (much stricter and standardized).
100
+
private keys :
93
101
</p>
102
+
<ul>
103
+
<li>
104
+
Browsers only support PKCS#8
105
+
</li>
106
+
<li>
107
+
Node.js supports both PKCS#1 and PKCS#8 private keys
108
+
</li>
109
+
</ul>
110
+
<p>
111
+
certificates :
112
+
</p>
113
+
<ul>
114
+
<li>
115
+
Browsers require the spki component in der form
116
+
</li>
117
+
<li>
118
+
node.js supports the entire certificate in pem format
0 commit comments