jvz commented on a change in pull request #176:
URL: https://github.com/apache/mina-sshd/pull/176#discussion_r511644242



##########
File path: 
sshd-common/src/main/java/org/apache/sshd/common/cipher/BuiltinCiphers.java
##########
@@ -102,6 +104,31 @@ public Cipher create() {
      */
     @Deprecated
     blowfishcbc(Constants.BLOWFISH_CBC, 8, 0, 16, "Blowfish", 128, 
"Blowfish/CBC/NoPadding", 8),
+    cc20p1305_openssh(Constants.CC20P1305_OPENSSH, 8, 16, 64, "ChaCha", 256, 
"ChaCha", 8) {
+        private volatile Boolean supported;
+
+        @Override
+        public boolean isSupported() {
+            if (supported == null) {
+                synchronized (this) {
+                    if (supported == null) {
+                        try {
+                            SecurityUtils.getCipher("ChaCha");
+                            supported = true;
+                        } catch (GeneralSecurityException ignored) {
+                            supported = false;
+                        }
+                    }
+                }
+            }
+            return supported;
+        }

Review comment:
       I just came across that method today as well. This could technically be 
supported by just copying the source code for ChaCha20 and Poly1305 since I had 
to combine them into the OpenSSH-specific AEAD form.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org
For additional commands, e-mail: dev-h...@mina.apache.org

Reply via email to