The point is that it&#x27;s using ECB mode with RSA, which indicates the developer has no real knowledge of crypto and is just blindly using pairs of &quot;encrypt&#x2F;decrypt&quot; functions from Node&#x27;s built-in crypto lib (which is essentially a thing wrapper around OpenSSL and thus joins its illustrious legacy of encouraging developers to make catastrophic cryptographic implementation mistakes).<p>In encryptMessage.js, the plaintext is split into chunks, and then chunks.forEach encrypts each chunk (via crypto.publicEncrypt) independently, and concatenates the chunks to form the ciphertext, aka ECB mode. You shouldn&#x27;t use ECB mode with any cipher because it is not semantically secure. This is Crypto 101.<p>In addition, it&#x27;s a bit wacky to use RSA encryption on your entire message because RSA operations are slow and you are limited to encrypting messages that are the length of your RSA key (well, minus the padding, which is how this developer arrived at the &quot;split plaintext into 214 byte chunks&quot; workaround).<p>A better solution (in every way) would be to use a &quot;hybrid&quot; encryption scheme, similar to TLS or GPG. To do this, you would:<p>1. Generate a random key for use with a symmetric cipher (e.g. AES-256)
2. Encrypt the plaintext with the random key, using a secure block mode (e.g. CBC, CTR)
3. Encrypt the random key with the RSA public key
4. Package those things together and share it on Github<p>Efficient and secure. Also totally unnecessary (you basically just reinvented a subset of GPG) but that&#x27;s neither here nor there.