mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [mina-sshd] jvz commented on a change in pull request #176: [SSHD-1017] Add support for chacha20-poly1305@openssh.com
Date Sun, 25 Oct 2020 20:26:32 GMT

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:
users@infra.apache.org



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


Mime
View raw message