<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Getting error - java.security.InvalidKeyException: Private Key cannot be used to encrypt. in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/getting-error-java-security-invalidkeyexception-private-key/m-p/7163417#M495935</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am getting below error while I try to encrypt using RSA key on HPUX platform&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;java.security.InvalidKeyException: Private Key cannot be used to encrypt.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I didn't face any issue on Linux and Windows with Oracle JDK installed. Can anybody please suggest workaround for this issue. Code is legacy and I can't change existing functionality.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 30 Mar 2022 05:11:31 GMT</pubDate>
    <dc:creator>pruthig</dc:creator>
    <dc:date>2022-03-30T05:11:31Z</dc:date>
    <item>
      <title>Getting error - java.security.InvalidKeyException: Private Key cannot be used to encrypt.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/getting-error-java-security-invalidkeyexception-private-key/m-p/7163417#M495935</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am getting below error while I try to encrypt using RSA key on HPUX platform&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;java.security.InvalidKeyException: Private Key cannot be used to encrypt.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I didn't face any issue on Linux and Windows with Oracle JDK installed. Can anybody please suggest workaround for this issue. Code is legacy and I can't change existing functionality.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Mar 2022 05:11:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/getting-error-java-security-invalidkeyexception-private-key/m-p/7163417#M495935</guid>
      <dc:creator>pruthig</dc:creator>
      <dc:date>2022-03-30T05:11:31Z</dc:date>
    </item>
    <item>
      <title>Re: Getting error - java.security.InvalidKeyException: Private Key cannot be used to encry</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/getting-error-java-security-invalidkeyexception-private-key/m-p/7163437#M495936</link>
      <description>&lt;P&gt;&amp;gt; I am getting below error while I try to encrypt using RSA key [...]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; "try to encrypt" what, _how_, exactly?&amp;nbsp; As usual, showing actual&lt;BR /&gt;commands (or program statements) with their actual output can be more&lt;BR /&gt;helpful than vague descriptions ("try to encrypt") or interpretations.&lt;/P&gt;&lt;P&gt;&amp;gt; [...] on HPUX platform&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; uname -a&lt;/P&gt;&lt;P&gt;&amp;gt; java.security.InvalidKeyException: Private Key cannot be used to encrypt.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Java version?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; I know nothing, but that message suggests (to me) that you've&lt;BR /&gt;specified a private key where you should have specified a public key.&lt;/P&gt;&lt;P&gt;&amp;gt; I didn't face any issue on Linux and Windows with Oracle JDK&lt;BR /&gt;&amp;gt; installed. [...]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; I can't see what you did on those systems, either.&lt;/P&gt;&lt;P&gt;&amp;gt; Can anybody please suggest workaround for this issue. [...]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Knowing nothing, I might try a Web search for, say:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "java.security.InvalidKeyException: Private Key cannot be used to encrypt."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; The Java motto: Write Once, Debug Everywhere.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2022 20:24:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/getting-error-java-security-invalidkeyexception-private-key/m-p/7163437#M495936</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2022-03-29T20:24:58Z</dc:date>
    </item>
  </channel>
</rss>

