<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hello Lothar,<br>
<br>
Thank you for quick response.<br>
<br>
<blockquote type="cite">
<pre wrap="">Make sure that you use the same JVM with this test as you use for your JSCH-call.</pre>
</blockquote>
<br>
I ran all tests from the application also.<br>
<br>
<br>
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">
<pre wrap=""> String cryptoAlg = "AES";
</pre>
</blockquote>
</blockquote>
<pre wrap="">change that to "AES256" and try again.</pre>
</blockquote>
<br>
It is not quite correct to replace "AES" with "AES256" based on the
following reference:
<a class="moz-txt-link-freetext" href="http://docs.oracle.com/javase/8/docs/technotes/guides/security/StandardNames.html">http://docs.oracle.com/javase/8/docs/technotes/guides/security/StandardNames.html</a><br>
Anyway I did few tests with 128, 192, 256 key lengths. All of them
are passed successfully. Here are fragments of my code, please write
me if I am mistaken:<br>
<br>
final SecretKeySpec keyspec = new SecretKeySpec(new byte[16],
"AES");<br>
final Cipher c = Cipher.getInstance("AES_128/CBC/NoPadding");<br>
<br>
final SecretKeySpec keyspec = new SecretKeySpec(new byte[24],
"AES");<br>
final Cipher c = Cipher.getInstance("AES_192/CBC/NoPadding");<br>
<br>
final SecretKeySpec keyspec = new SecretKeySpec(new byte[32],
"AES");<br>
final Cipher c = Cipher.getInstance("AES_256/CBC/NoPadding");<br>
<br>
<br>
<blockquote type="cite">
<blockquote type="cite">
<pre wrap="">JSch logs failed.txt
</pre>
</blockquote>
<pre wrap="">[...]
</pre>
<blockquote type="cite">
<pre wrap="">aes256-cbc is not available.
aes192-cbc is not available. </pre> </blockquote> <pre wrap="">[...] </pre> <blockquote type="cite"> <pre wrap="">kex: server->client aes128-cbc hmac-md5 none
kex: client->server aes128-cbc hmac-md5 none
</pre>
</blockquote>
<pre wrap="">The server only accepts CBC-based ciphers that are
not available with this JVM.
</pre>
</blockquote>
<br>
Let us assume that aes256-cbc and aes192-cbc are not available but
It reports nothing about aes128-cbc availability:<br>
<br>
<blockquote type="cite">kex: server:
twofish-cbc,twofish128-cbc,3des-cbc,cast128-cbc,aes256-cbc,<b><font
color="#ff0000">aes128-cbc</font></b></blockquote>
<blockquote type="cite">kex: client: aes128-ctr,<b><font
color="#ff0000">aes128-cbc</font></b>,3des-ctr,3des-cbc,blowfish-cbc</blockquote>
<br>
So why it is failed?<br>
<br>
-----<br>
Sincerely,<br>
Nick<br>
<br>
<div class="moz-cite-prefix">11.09.2014 16:53, Lothar Kimmeringer
wrote:<br>
</div>
<blockquote cite="mid:***@kimmeringer.de" type="cite">
<pre wrap="">Am 11.09.2014 13:04, schrieb Nick:
</pre>
<blockquote type="cite">
<pre wrap="">Also the following test passes fine without any exception:
</pre>
</blockquote>
<pre wrap="">[...]
</pre>
<blockquote type="cite">
<blockquote type="cite">
<pre wrap=""> String cryptoAlg = "AES";
</pre>
</blockquote>
</blockquote>
<pre wrap="">
change that to "AES256" and try again. Make sure that you use the
same JVM with this test as you use for your JSCH-call. Your JMV
might implicitly use AES-64 since we haven't specified the length.
</pre>
<blockquote type="cite">
<pre wrap="">JSch logs failed.txt
</pre>
</blockquote>
<pre wrap="">[...]
</pre>
<blockquote type="cite">
<pre wrap="">aes256-cbc is not available.
aes192-cbc is not available. </pre> </blockquote> <pre wrap="">[...] </pre> <blockquote type="cite"> <pre wrap="">kex: server->client aes128-cbc hmac-md5 none
kex: client->server aes128-cbc hmac-md5 none
</pre>
</blockquote>
<pre wrap="">
The server only accepts CBC-based ciphers that are
not available with this JVM.
</pre>
<blockquote type="cite">
<pre wrap="">JSch logs success.txt
</pre>
</blockquote>
<pre wrap="">[...]
</pre>
<blockquote type="cite">
<pre wrap="">aes256-cbc is not available.
aes192-cbc is not available. </pre> </blockquote> <pre wrap="">[...] </pre> <blockquote type="cite"> <pre wrap="">kex: server->client aes128-ctr hmac-md5 none
kex: client->server aes128-ctr hmac-md5 none
</pre>
</blockquote>
<pre wrap="">
Here the server also allows CTR-based ciphers that the
JVM allows as well.
My bet still is on the missing policy files. But Java8 seems to
allow a bit more than previous JVMs (the above test was based on).
Cheers, Lothar
------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
<a class="moz-txt-link-freetext" href="http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk">http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk</a>
_______________________________________________
JSch-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:JSch-***@lists.sourceforge.net">JSch-***@lists.sourceforge.net</a>
<a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/jsch-users">https://lists.sourceforge.net/lists/listinfo/jsch-users</a>
</pre>
</blockquote>
<br>
</body>
</html>