This is a discussion on oracle 10g cryptography problem within the Oracle Miscellaneous forums, part of the Oracle Database category; --> Hi, I have a java stored procedure for oracle 10g (running jdk1.4) that uses the javax.crypto package and the ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi, I have a java stored procedure for oracle 10g (running jdk1.4) that uses the javax.crypto package and the bouncy castle provider for RSA decryption. Here is a snippet of the code in the procedure: Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider ()); Cipher rsaCipher = Cipher.getInstance("RSA"); RSAPrivateKey key = (RSAPrivateKey) MSPrivKeytoJKey.getPrivateKey(aKey); rsaCipher.init(Cipher.DECRYPT_MODE, key); rsaCipher.doFinal(encryptedByteArray); This works fine on my own machine running jdk1.4. However, when I load my stored procedure into the database and run it, I get the following exception after the line Cipher rsaCipher = Cipher.getInstance("RSA"); tries to execute: java.security.NoSuchAlgorithmException: Cannot find any provider supporting RSA I have tried the following (based on information gathered from various forums): - ran loadjava -u username/pass@DB -v bcprov-jdk14-137.jar - added the following line to java.security security.provider.4=org.bouncycastle.jce.provider. BouncyCastleProvider but i still get the same error. I am reaching out desperately to all you experts for help Pouria |
| |||
| Pouria wrote: > > Cipher rsaCipher = Cipher.getInstance("RSA"); > > tries to execute: > > java.security.NoSuchAlgorithmException: Cannot find any provider > supporting RSA Which part of the message don't you understand? And no version of Oracle named. Put away the RSA and use the built-in tools. Obfuscation toolkit if 9i and DBMS_CRYPTO if 10g. -- Daniel A. Morgan University of Washington damorgan@x.washington.edu (replace x with u to respond) Puget Sound Oracle Users Group www.psoug.org |
| |||
| i understand the message, what i don't understand is why it can't find an RSA provider when i'm purposely supplying it with one (bouncy castle). secondly i need to use an asymmetric cryptographic algorithm: Obfuscation toolkit and DBMS_CRYPTO do not support these to the best of my knowledge (please correct me if i'm wrong). Pouria On Jun 26, 6:27 pm, DA Morgan <damor...@psoug.org> wrote: > Pouria wrote: > > > Cipher rsaCipher = Cipher.getInstance("RSA"); > > > tries to execute: > > > java.security.NoSuchAlgorithmException: Cannot find any provider > > supporting RSA > > Which part of the message don't you understand? > > And no version of Oracle named. > > Put away the RSA and use the built-in tools. Obfuscation toolkit if > 9i and DBMS_CRYPTO if 10g. > -- > Daniel A. Morgan > University of Washington > damor...@x.washington.edu (replace x with u to respond) > Puget Sound Oracle Users Groupwww.psoug.org |
| |||
| by the way, my oracle version is 10.2.0.1 for windows xp. On Jun 26, 6:27 pm, DA Morgan <damor...@psoug.org> wrote: > Pouria wrote: > > > Cipher rsaCipher = Cipher.getInstance("RSA"); > > > tries to execute: > > > java.security.NoSuchAlgorithmException: Cannot find any provider > > supporting RSA > > Which part of the message don't you understand? > > And no version of Oracle named. > > Put away the RSA and use the built-in tools. Obfuscation toolkit if > 9i and DBMS_CRYPTO if 10g. > -- > Daniel A. Morgan > University of Washington > damor...@x.washington.edu (replace x with u to respond) > Puget Sound Oracle Users Groupwww.psoug.org |
| |||
| Pouria wrote: > i understand the message, what i don't understand is why it can't find > an RSA provider when i'm purposely supplying it with one (bouncy > castle). > > secondly i need to use an asymmetric cryptographic algorithm: > Obfuscation toolkit and DBMS_CRYPTO do not support these to the best > of my knowledge (please correct me if i'm wrong). > > Pouria > > On Jun 26, 6:27 pm, DA Morgan <damor...@psoug.org> wrote: >> Pouria wrote: >> >>> Cipher rsaCipher = Cipher.getInstance("RSA"); >>> tries to execute: >>> java.security.NoSuchAlgorithmException: Cannot find any provider >>> supporting RSA >> Which part of the message don't you understand? >> >> And no version of Oracle named. >> >> Put away the RSA and use the built-in tools. Obfuscation toolkit if >> 9i and DBMS_CRYPTO if 10g. >> -- >> Daniel A. Morgan >> University of Washington >> damor...@x.washington.edu (replace x with u to respond) >> Puget Sound Oracle Users Groupwww.psoug.org I may be incorrect on this but I believe AES is asymmetric. -- Daniel A. Morgan University of Washington damorgan@x.washington.edu (replace x with u to respond) Puget Sound Oracle Users Group www.psoug.org |
| |||
| On Jun 27, 7:21 am, DA Morgan <damor...@psoug.org> wrote: > Pouria wrote: > > i understand the message, what i don't understand is why it can't find > > an RSA provider when i'm purposely supplying it with one (bouncy > > castle). > > > secondly i need to use an asymmetric cryptographic algorithm: > > Obfuscation toolkit and DBMS_CRYPTO do not support these to the best > > of my knowledge (please correct me if i'm wrong). > > > Pouria > > > On Jun 26, 6:27 pm, DA Morgan <damor...@psoug.org> wrote: > >> Pouria wrote: > > >>> Cipher rsaCipher = Cipher.getInstance("RSA"); > >>> tries to execute: > >>> java.security.NoSuchAlgorithmException: Cannot find any provider > >>> supporting RSA > >> Which part of the message don't you understand? > > >> And no version of Oracle named. > > >> Put away the RSA and use the built-in tools. Obfuscation toolkit if > >> 9i and DBMS_CRYPTO if 10g. > >> -- > >> Daniel A. Morgan > >> University of Washington > >> damor...@x.washington.edu (replace x with u to respond) > >> Puget Sound Oracle Users Groupwww.psoug.org > > I may be incorrect on this but I believe AES is asymmetric. > -- > Daniel A. Morgan > University of Washington > damor...@x.washington.edu (replace x with u to respond) > Puget Sound Oracle Users Groupwww.psoug.org AES is symmetric. As of the OP's issue, note 369369.1 on MetaLink describes steps to add and load third-party providers to the Oracle VM. Also, the note states that there was a bug in 10.2.0.1 (bug #4475814) that prevented third- party providers from working inside the Oracle VM, which is fixed in 10.2.0.2. In 10.2.0.1, only SunJce is supported. However, since SunJce supports RSA, I don't see an urgent need to load Bouncy Castle and go through the bouncing hassle of applying the patchset and then following the note 369369.1 to make it work... Regards, Vladimir M. Zakharychev N-Networks, makers of Dynamic PSP(tm) http://www.dynamicpsp.com |
| |||
| Dear Vladimir , Unfortunately sunjce only supports RSA in jdk 1.5+ and for jdk 1.4 (used by oracle 10.2.0.1) a third party provider is needed. I have followed the metalink instructions with no luck and 10.2.0.2 is not available for 32-bit windows! Its quite the dilemma... Pouria > As of the OP's issue, note 369369.1 on MetaLink describes steps to add > and load third-party providers to the Oracle VM. Also, the note states > that there was a bug in 10.2.0.1 (bug #4475814) that prevented third- > party providers from working inside the Oracle VM, which is fixed in > 10.2.0.2. In 10.2.0.1, only SunJce is supported. However, since SunJce > supports RSA, I don't see an urgent need to load Bouncy Castle and go > through the bouncing hassle of applying the patchset and then > following the note 369369.1 to make it work... On Jun 28, 1:14 pm, "Vladimir M. Zakharychev" <vladimir.zakharyc...@gmail.com> wrote: > On Jun 27, 7:21 am, DA Morgan <damor...@psoug.org> wrote: > > > > > Pouria wrote: > > > i understand the message, what i don't understand is why it can't find > > > an RSA provider when i'm purposely supplying it with one (bouncy > > > castle). > > > > secondly i need to use an asymmetric cryptographic algorithm: > > > Obfuscation toolkit and DBMS_CRYPTO do not support these to the best > > > of my knowledge (please correct me if i'm wrong). > > > > Pouria > > > > On Jun 26, 6:27 pm, DA Morgan <damor...@psoug.org> wrote: > > >> Pouria wrote: > > > >>> Cipher rsaCipher = Cipher.getInstance("RSA"); > > >>> tries to execute: > > >>> java.security.NoSuchAlgorithmException: Cannot find any provider > > >>> supporting RSA > > >> Which part of the message don't you understand? > > > >> And no version of Oracle named. > > > >> Put away the RSA and use the built-in tools. Obfuscation toolkit if > > >> 9i and DBMS_CRYPTO if 10g. > > >> -- > > >> Daniel A. Morgan > > >> University of Washington > > >> damor...@x.washington.edu (replace x with u to respond) > > >> Puget Sound Oracle Users Groupwww.psoug.org > > > I may be incorrect on this but I believe AES is asymmetric. > > -- > > Daniel A. Morgan > > University of Washington > > damor...@x.washington.edu (replace x with u to respond) > > Puget Sound Oracle Users Groupwww.psoug.org > > AES is symmetric. > > As of the OP's issue, note 369369.1 on MetaLink describes steps to add > and load third-party providers to the Oracle VM. Also, the note states > that there was a bug in 10.2.0.1 (bug #4475814) that prevented third- > party providers from working inside the Oracle VM, which is fixed in > 10.2.0.2. In 10.2.0.1, only SunJce is supported. However, since SunJce > supports RSA, I don't see an urgent need to load Bouncy Castle and go > through the bouncing hassle of applying the patchset and then > following the note 369369.1 to make it work... > > Regards, > Vladimir M. Zakharychev > N-Networks, makers of Dynamic PSP(tm) > http://www.dynamicpsp.com |
| |||
| On Jun 28, 9:18 pm, Pouria <pour...@gmail.com> wrote: > > As of the OP's issue, note 369369.1 on MetaLink describes steps to add > > and load third-party providers to the Oracle VM. Also, the note states > > that there was a bug in 10.2.0.1 (bug #4475814) that prevented third- > > party providers from working inside the Oracle VM, which is fixed in > > 10.2.0.2. In 10.2.0.1, only SunJce is supported. However, since SunJce > > supports RSA, I don't see an urgent need to load Bouncy Castle and go > > through the bouncing hassle of applying the patchset and then > > following the note 369369.1 to make it work... > > On Jun 28, 1:14 pm, "Vladimir M. Zakharychev" > > <vladimir.zakharyc...@gmail.com> wrote: > > On Jun 27, 7:21 am, DA Morgan <damor...@psoug.org> wrote: > > > > Pouria wrote: > > > > i understand the message, what i don't understand is why it can't find > > > > an RSA provider when i'm purposely supplying it with one (bouncy > > > > castle). > > > > > secondly i need to use an asymmetric cryptographic algorithm: > > > > Obfuscation toolkit and DBMS_CRYPTO do not support these to the best > > > > of my knowledge (please correct me if i'm wrong). > > > > > Pouria > > > > > On Jun 26, 6:27 pm, DA Morgan <damor...@psoug.org> wrote: > > > >> Pouria wrote: > > > > >>> Cipher rsaCipher = Cipher.getInstance("RSA"); > > > >>> tries to execute: > > > >>> java.security.NoSuchAlgorithmException: Cannot find any provider > > > >>> supporting RSA > > > >> Which part of the message don't you understand? > > > > >> And no version of Oracle named. > > > > >> Put away the RSA and use the built-in tools. Obfuscation toolkit if > > > >> 9i and DBMS_CRYPTO if 10g. > > > >> -- > > > >> Daniel A. Morgan > > > >> University of Washington > > > >> damor...@x.washington.edu (replace x with u to respond) > > > >> Puget Sound Oracle Users Groupwww.psoug.org > > > > I may be incorrect on this but I believe AES is asymmetric. > > > -- > > > Daniel A. Morgan > > > University of Washington > > > damor...@x.washington.edu (replace x with u to respond) > > > Puget Sound Oracle Users Groupwww.psoug.org > > > AES is symmetric. > > > As of the OP's issue, note 369369.1 on MetaLink describes steps to add > > and load third-party providers to the Oracle VM. Also, the note states > > that there was a bug in 10.2.0.1 (bug #4475814) that prevented third- > > party providers from working inside the Oracle VM, which is fixed in > > 10.2.0.2. In 10.2.0.1, only SunJce is supported. However, since SunJce > > supports RSA, I don't see an urgent need to load Bouncy Castle and go > > through the bouncing hassle of applying the patchset and then > > following the note 369369.1 to make it work... > > > Regards, > > Vladimir M. Zakharychev > > N-Networks, makers of Dynamic PSP(tm) > > http://www.dynamicpsp.com > > Dear Vladimir , > > Unfortunately sunjce only supports RSA in jdk 1.5+ and for jdk 1.4 > (used by oracle 10.2.0.1) a third party provider is needed. I have > followed the metalink instructions with no luck and 10.2.0.2 is not > available for 32-bit windows! Its quite the dilemma... > > Pouria > 10.2.0.2 is definitely available for Win32 (locate patch 4547817 on MetaLink through simple search by patch number,) but you can skip it and patch right to 10.2.0.3 (patch 5337014) - Oracle patchsets are cumulative. Carefully follow the instructions accompanying the patchset to apply it. Then follow the instructions in the note 369269.1 and I'm sure that with a little bit of luck it will work. Regards, Vladimir M. Zakharychev N-Networks, makers of Dynamic PSP(tm) http://www.dynamicpsp.com p.s. Please, do not top-post. |
| ||||
| Vladimir M. Zakharychev wrote: > On Jun 27, 7:21 am, DA Morgan <damor...@psoug.org> wrote: >> Pouria wrote: >>> i understand the message, what i don't understand is why it can't find >>> an RSA provider when i'm purposely supplying it with one (bouncy >>> castle). >>> secondly i need to use an asymmetric cryptographic algorithm: >>> Obfuscation toolkit and DBMS_CRYPTO do not support these to the best >>> of my knowledge (please correct me if i'm wrong). >>> Pouria >>> On Jun 26, 6:27 pm, DA Morgan <damor...@psoug.org> wrote: >>>> Pouria wrote: >>>>> Cipher rsaCipher = Cipher.getInstance("RSA"); >>>>> tries to execute: >>>>> java.security.NoSuchAlgorithmException: Cannot find any provider >>>>> supporting RSA >>>> Which part of the message don't you understand? >>>> And no version of Oracle named. >>>> Put away the RSA and use the built-in tools. Obfuscation toolkit if >>>> 9i and DBMS_CRYPTO if 10g. >>>> -- >>>> Daniel A. Morgan >>>> University of Washington >>>> damor...@x.washington.edu (replace x with u to respond) >>>> Puget Sound Oracle Users Groupwww.psoug.org >> I may be incorrect on this but I believe AES is asymmetric. >> -- >> Daniel A. Morgan >> University of Washington >> damor...@x.washington.edu (replace x with u to respond) >> Puget Sound Oracle Users Groupwww.psoug.org > > AES is symmetric. > > As of the OP's issue, note 369369.1 on MetaLink describes steps to add > and load third-party providers to the Oracle VM. Also, the note states > that there was a bug in 10.2.0.1 (bug #4475814) that prevented third- > party providers from working inside the Oracle VM, which is fixed in > 10.2.0.2. In 10.2.0.1, only SunJce is supported. However, since SunJce > supports RSA, I don't see an urgent need to load Bouncy Castle and go > through the bouncing hassle of applying the patchset and then > following the note 369369.1 to make it work... > > Regards, > Vladimir M. Zakharychev > N-Networks, makers of Dynamic PSP(tm) > http://www.dynamicpsp.com > Thanks for the correction. -- Daniel A. Morgan University of Washington damorgan@x.washington.edu (replace x with u to respond) Puget Sound Oracle Users Group www.psoug.org |