title: JAVA JDK1.9 java.security.NoSuchAlgorithmException: Unsupported secret key algorithm: DES
body: <p>I'have an api who use <code>DES</code> i know is bad ... but i can't change that and i have to support this old legacy system (i have an rmi client part in my side)</p>
  
  <p>also i look for a way to enabled on jdk1.9 the <code>DES</code> algorithm
  my program run well on old jdk</p>
  
  <p>i'am looking around 
  <code>/usr/java/jdk-9.0.4/conf/security/java.security</code>
  and value: <code>jdk.tls.legacyAlgorithms</code></p>
  
  <p>but here i don't know how to modify the default value i try</p>
  
  <pre><code>dk.tls.legacyAlgorithms= \
          K_NULL, C_NULL, M_NULL, \
          DH_anon, ECDH_anon, \
          RC4_128, RC4_40, DES_CBC, DES40_CBC, \
          3DES_EDE_CBC, \
          DES_CBC, \
          DES
  </code></pre>
  
  <p>and somme other value but without succes</p>
  
  <p>the full stack trace</p>
  
  <pre><code>java.security.NoSuchAlgorithmException: Unsupported secret key algorithm: DES
      at java.base/com.sun.crypto.provider.DHKeyAgreement.engineGenerateSecret(DHKeyAgreement.java:387)
      at java.base/javax.crypto.KeyAgreement.generateSecret(KeyAgreement.java:660)
      at com.adesoft.security.EncryptedPassword._cipher(Unknown Source)
      at com.adesoft.security.EncryptedPassword.cipher(Unknown Source)
      at com.adesoft.login.WebSessions.connect(Unknown Source)
      at com.adesoft.beans.SessionBean.setPassword(Unknown Source)
      at util.ade.AdeSebastient.getRWConnection(AdeSebastient.java:59)
  </code></pre>
  
  <p>adesoft is my legacy rmi client
  util.ade.AdeSebastien --> i where i use the client to try the connection to my rmi system</p>
  
  <p>if somme one have knoledge about this difficulty
  thanks</p>