KeyFactory for RSASSA-PSS

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

KeyFactory for RSASSA-PSS

extern.Markus Ganss
Hi all,

I try to get a KeyFactory for the RSASSA-PSS Algorithm with registered BouncyCastleProvider, but get a NonSuchAlgorithmException:

java.security.NoSuchAlgorithmException: no such algorithm: PSS for provider BC

I am using these maven dependencies:

  <dependency>      <groupId>org.bouncycastle</groupId>      <artifactId>bcprov-jdk15on</artifactId>      <version>1.60</version>  </dependency>  
  <dependency>      <groupId>org.bouncycastle</groupId>      <artifactId>bcpkix-jdk15on</artifactId>      <version>1.60</version>  </dependency> 

And my java code is quite simple:

public void testRegisterBouncyCastleProvider() { 
 System.out.println("Test BouncyCastleProvider started"); 
 BouncyCastleProvider provider = new BouncyCastleProvider();       
 Security.addProvider(provider); 
 try { 
      KeyFactory factory = KeyFactory.getInstance("PSS",provider);     
      assertNotNull("KeyFactory is null",factory); 
 } catch (NoSuchAlgorithmException e) {  
     e.printStackTrace();  
    fail("No Provider"); 
 }
}

I also tried with:

KeyFactory factory = KeyFactory.getInstance("RSASSA-PSS",provider);

Any ideas, how i can get a KeyFactory for RSASSA-PSS?

Thanks for help,

Best Regards

Markus
Reply | Threaded
Open this post in threaded view
|

Re: KeyFactory for RSASSA-PSS

Eckenfels. Bernd

You will have to generate normal RSA keys, they dont differ from usage for RSAPSS (at least not in the key material, the certificates on the other hand might)

 

Von: extern.Markus Ganss <[hidden email]>
Gesendet: Donnerstag, 9. August 2018 17:23
An: [hidden email]
Betreff: [dev-crypto] KeyFactory for RSASSA-PSS

 

Hi all,

 

I try to get a KeyFactory for the RSASSA-PSS Algorithm with registered BouncyCastleProvider, but get a NonSuchAlgorithmException:

 

java.security.NoSuchAlgorithmException: no such algorithm: PSS for provider BC

 

I am using these maven dependencies:

 

  <dependency>      <groupId>org.bouncycastle</groupId>      <artifactId>bcprov-jdk15on</artifactId>      <version>1.60</version>  </dependency>  
  <dependency>      <groupId>org.bouncycastle</groupId>      <artifactId>bcpkix-jdk15on</artifactId>      <version>1.60</version>  </dependency> 

 

And my java code is quite simple:

 

public void testRegisterBouncyCastleProvider() { 
 System.out.println("Test BouncyCastleProvider started"); 
 BouncyCastleProvider provider = new BouncyCastleProvider();       
 Security.addProvider(provider); 
 try { 
      KeyFactory factory = KeyFactory.getInstance("PSS",provider);     
      assertNotNull("KeyFactory is null",factory); 
 } catch (NoSuchAlgorithmException e) {  
     e.printStackTrace();  
    fail("No Provider"); 
 }
}

 

I also tried with:

 

KeyFactory factory = KeyFactory.getInstance("RSASSA-PSS",provider);

 

Any ideas, how i can get a KeyFactory for RSASSA-PSS?

 

Thanks for help,

 

Best Regards

 

Markus






     


SEEBURGER AG   Vorstand/SEEBURGER Executive Board:
Sitz der Gesellschaft/Registered Office:   Axel Haas, Michael Kleeberg, Friedemann Heinz, Dr. Martin Kuntz, Matthias Feßenbecker
Edisonstr. 1  
D-75015 Bretten Vorsitzende des Aufsichtsrats/Chairperson of the SEEBURGER Supervisory Board:
Tel.: 07252 / 96 - 0 Prof. Dr. Simone Zeuchner
Fax: 07252 / 96 - 2222
Internet: http://www.seeburger.de Registergericht/Commercial Register:
e-mail: [hidden email] HRB 240708 Mannheim


Dieses E-Mail ist nur für den Empfänger bestimmt, an den es gerichtet ist und kann vertrauliches bzw. unter das Berufsgeheimnis fallendes Material enthalten. Jegliche darin enthaltene Ansicht oder Meinungsäußerung ist die des Autors und stellt nicht notwendigerweise die Ansicht oder Meinung der SEEBURGER AG dar. Sind Sie nicht der Empfänger, so haben Sie diese E-Mail irrtümlich erhalten und jegliche Verwendung, Veröffentlichung, Weiterleitung, Abschrift oder jeglicher Druck dieser E-Mail ist strengstens untersagt. Weder die SEEBURGER AG noch der Absender (Eckenfels. Bernd) übernehmen die Haftung für Viren; es obliegt Ihrer Verantwortung, die E-Mail und deren Anhänge auf Viren zu prüfen.

This email is intended only for the recipient(s) to whom it is addressed. This email may contain confidential material that may be protected by professional secrecy. Any fact or opinion contained, or expression of the material herein, does not necessarily reflect that of SEEBURGER AG. If you are not the addressee or if you have received this email in error, any use, publication or distribution including forwarding, copying or printing is strictly prohibited. Neither SEEBURGER AG, nor the sender (Eckenfels. Bernd) accept liability for viruses; it is your responsibility to check this email and its attachments for viruses.

Reply | Threaded
Open this post in threaded view
|

Re: Re: [dev-crypto] KeyFactory for RSASSA-PSS

extern.Markus Ganss
Hello Bernd,

thank you for your answer. That helped me very much.

Best Regards

Markus
>>> "Eckenfels. Bernd" <[hidden email]> 09.08.2018 17:42 >>>
You will have to generate normal RSA keys, they dont differ from usage for RSAPSS (at least not in the key material, the certificates on the other hand might)
 
Von: extern.Markus Ganss <[hidden email]>
Gesendet: Donnerstag, 9. August 2018 17:23
An: [hidden email]
Betreff: [dev-crypto] KeyFactory for RSASSA-PSS
 
Hi all,
 
I try to get a KeyFactory for the RSASSA-PSS Algorithm with registered BouncyCastleProvider, but get a NonSuchAlgorithmException:
 
java.security.NoSuchAlgorithmException: no such algorithm: PSS for provider BC
 
I am using these maven dependencies:
 
  <dependency>      <groupId>org.bouncycastle</groupId>      <artifactId>bcprov-jdk15on</artifactId>      <version>1.60</version>  </dependency>  
  <dependency>      <groupId>org.bouncycastle</groupId>      <artifactId>bcpkix-jdk15on</artifactId>      <version>1.60</version>  </dependency> 
 
And my java code is quite simple:
 
public void testRegisterBouncyCastleProvider() { 
 System.out.println("Test BouncyCastleProvider started"); 
 BouncyCastleProvider provider = new BouncyCastleProvider();       
 Security.addProvider(provider); 
 try { 
      KeyFactory factory = KeyFactory.getInstance("PSS",provider);     
      assertNotNull("KeyFactory is null",factory); 
 } catch (NoSuchAlgorithmException e) {  
     e.printStackTrace();  
    fail("No Provider"); 
 }
}
 
I also tried with:
 
KeyFactory factory = KeyFactory.getInstance("RSASSA-PSS",provider);
 
Any ideas, how i can get a KeyFactory for RSASSA-PSS?
 
Thanks for help,
 
Best Regards
 
Markus

     

SEEBURGER AG   Vorstand/SEEBURGER Executive Board:
Sitz der Gesellschaft/Registered Office:   Axel Haas, Michael Kleeberg, Friedemann Heinz, Dr. Martin Kuntz, Matthias Feßenbecker
Edisonstr. 1  
D-75015 Bretten Vorsitzende des Aufsichtsrats/Chairperson of the SEEBURGER Supervisory Board:
Tel.: 07252 / 96 - 0 Prof. Dr. Simone Zeuchner
Fax: 07252 / 96 - 2222
Internet: http://www.seeburger.de Registergericht/Commercial Register:
e-mail: [hidden email] HRB 240708 Mannheim

Dieses E-Mail ist nur für den Empfänger bestimmt, an den es gerichtet ist und kann vertrauliches bzw. unter das Berufsgeheimnis fallendes Material enthalten. Jegliche darin enthaltene Ansicht oder Meinungsäußerung ist die des Autors und stellt nicht notwendigerweise die Ansicht oder Meinung der SEEBURGER AG dar. Sind Sie nicht der Empfänger, so haben Sie diese E-Mail irrtümlich erhalten und jegliche Verwendung, Veröffentlichung, Weiterleitung, Abschrift oder jeglicher Druck dieser E-Mail ist strengstens untersagt. Weder die SEEBURGER AG noch der Absender (Eckenfels. Bernd) übernehmen die Haftung für Viren; es obliegt Ihrer Verantwortung, die E-Mail und deren Anhänge auf Viren zu prüfen.

This email is intended only for the recipient(s) to whom it is addressed. This email may contain confidential material that may be protected by professional secrecy. Any fact or opinion contained, or expression of the material herein, does not necessarily reflect that of SEEBURGER AG. If you are not the addressee or if you have received this email in error, any use, publication or distribution including forwarding, copying or printing is strictly prohibited. Neither SEEBURGER AG, nor the sender (Eckenfels. Bernd) accept liability for viruses; it is your responsibility to check this email and its attachments for viruses.