Can using BouncyCastle be an alternative to installing the policy files?

Hey, sorry if this is a dumb question but I have been looking into this all day.
I want to write a program that incorporates unlimited strength encryption, but installing the JCE Unlimited Strength Jurisdiction Policy Files is not an option (I can do it on one of the development machines, but I don't have write access to JAVAHOME on the other, and I can't expect every user of the program to install these files).
Now I know that if I specify BouncyCastle as a provider when using JCE, I still have to install the above files... but what if I don't use JCE and I use the algorithms provided (handily without any form of documentation whatsoever) by BouncyCastle - can this be a workaround? I've heard conflicting views on this.
If this isn't the case, can anyone please point me in the right direction of what I could do instead? Ie. if there was some way to include these files in the classpath rather than actually install them.
Also, if using BC is a solution to problem, I would really appreciate it if anyone has such an example of AES-256 encryption and decryption with CBC and padding that they could point me in the direction of, I am having a real issue figuring out the BC API.
Thank-you so much if you can help me.

As long as you use the BouncyCastle lightweight crypto API rather than the JCE you should not encounter any of the JCE's restrictions. This means you cannot use Cipher.getInstance("Whatever/ABCCBC/TooMuchPadding", "BC"). Just include the lightweight api jar in your class path; the source is here: http://www.bouncycastle.org/download/lcrypto-jdk1<whatever>-139.zip
I haven't played with bouncycastle in awhile, but I think something like this will get you started:
BlockCipher aes = new AESEngine();
CBCBlockCipher aes_cbc = new CBCBlockCipher(aes);
byte [] key = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; // 16 bytes for AES-128
CipherParameters params = new KeyParameter(key);
aes_cbc.init(true, params);
//...

Similar Messages

  • How do I block this msg from always popping up "iTunes requires Safari 4.0.3 or later to be installed to use the iTunes Store within iTunes. Use Software Update to download and install the latest version of Safari" bc I can't download the latest software?

    How do I block this msg from always popping up "iTunes requires Safari 4.0.3 or later to be installed to use the iTunes Store within iTunes. Use Software Update to download and install the latest version of Safari". I cannot download this software bc my lap top is to old. The msg literally pops up everytime I make any moves on itunes and is VERY annoying.

    I have a 2006 MacBook with an Mac OS X version 10.5.
    In that case, try downloading a Safari 5.0.5 for leopard from the following location:
    http://www.apple.com/safari/download/

  • Firefox.exe has encountered a problem and needs to close. We are sorry for the inconvenience. I have been using firefox for years. I installed the latest version of Firefox. It worked fine for several days. Now I get the above message each time I try to s

    firefox.exe has encountered a problem and needs to close. We are sorry for the inconvenience.
    I have been using firefox for years. I installed the latest version of Firefox. It worked fine for several days. Now I get the above message each time I try to start Firefox, even in safe mode. i have checked with latest antivirus softwere also.. i didn't find any thing suspicious.
    == This happened ==
    Every time Firefox opened
    == after loading firefox 3.6.6 ==
    == User Agent ==
    Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.99 Safari/533.4

    I was having this problem few days ago,and I have fixed.Try this steps-If you have AVG antivirus so go on firefox>Tools>Add On and Disable AVG safe search and AVG tool bars too.Then restart computer.

  • Hi, can anyone please tell me how to install the Nik collection into Adobe Photoshop CC 2014.2.1

    Hi, can anyone please tell me how to install the Nik collection into Adobe Photoshop CC 2014.2.1 ?

    Glad I could help. Thanks for letting me know I did.
    Gene

  • Ive just learned that i can use loadjava to load jsp pages into the database.

    Ive just learned that i can use loadjava to load jsp pages into the database. How is that possible. How can someone go to my lets say, index.jsp page and actually see it if its inside the database? What authenticates it? Where would you set the parameters to tell http(apache) to look inside the db for the pages?
    Any ideas?

    Thanks for the reply. If I put the file on the database, does it have to be in a particular location? I've put it on the database server, launched sql*plus (as APPS) and ran the following:
    execute dbms_java.loadjava('-v', 'ZebraGetPrinterFromXML.class');
    PL/SQL procedure successfully completed.Then when I try to run a process that uses this I get this:
    ORA-29540: class ZebraGetPrinterFromXML does not exist

  • After i download ios 5.1.1 i cant install it there is msg tell me an error occurred installing ios 5.1.1 what can i do to solve this and install the update ( i have ipad 2 ) ?????

    After i download ios 5.1.1 i cant install it there is msg tell me an error occurred installing ios 5.1.1 what can i do to solve this and install the update ( i have ipad 2 ) ?????

    No codes on the error just msg in the center of the ipad tell me that without any codes :@

  • Hello everyone I have a question I use my Apple ID for iMessage but I want to know if I can use my friends Apple ID just for the App Store, can I do that ????

    Hello everyone I have a question I use my Apple ID for iMessage but I want to know if I can use my friends Apple ID just for the App Store, can I do that ????

    First on a computer try editing your ID to change the payment method to None.
    How do I change my Apple ID Name or personal information?
    You can change your Apple ID Name at My Apple ID. Click on Manage your Apple ID and sign in with your Apple ID name and password. Click Edit and enter the new information, then click Save Changes. Changes take effect immediately. You can also use My Apple ID to change your personal information, such as your mailing address or email address. See Changing the name you use for your Apple ID if you'd like more information.
    If problems see:
    Why can’t I select None when I edit my payment information?
    Last:
    Create a NEW account using these instructions. You have to use an email address not used with Apple before.
    Create a NEW account using these instructions. Make sure you follow the instructions. Many do not and if you do not you will not get the None option. You must use an email address that you have not used with Apple before.
    Creating an iTunes Store, App Store, iBookstore, and Mac App Store account without a credit card

  • My Macbook is running on OS 10.5.8. However, I forgot my admin password. I would like to find out if I can use OS 10.6 CD to reset the admin password while upgrading OS? Also, will all my files be still present after upgrade??

    My Macbook is running on OS 10.5.8. However, I forgot my admin password. I would like to find out if I can use OS 10.6 CD to reset the admin password while upgrading OS? Also, will all my files be still present after upgrade??

    1. Should be possible to do that; go to the Utilities menu and select 'reset password' before starting the installer. (while booted from the DVD of course)
    2. Standard installation of SL only replaces system components; applications, user data and preference settings should not be affected.
    3. But you do have a backup just in case, don't you?

  • Lightroom 3 (Vers 3.6) - "An error occurred when attempting to change modules" - is the message I get when clicking on Develop or any other option. I have deleted and re-installed the .dmg file, but it still keeps happening. Can anyone help?

    I just downloaded Lightroom 3 (Vers 3.6) and once I installed it and opened it, it said that there are an error changing modules. I deleted it and re-installed the .dmg file and it still gives me that error. Can anyone help?

    Error changing modules | Lightroom

  • I am getting error "The disk is used for Time Machine Backup" when installing the new OSX Mountain Lion upgrade"

    I am keep getting this error "The disk is used for Time Machine Backup" when installing the new OSX Mountain Lion" when doing the upgrade to newly OS.

    The folder would be at the root of your hard drive. Double-click Macintosh HD and look there.
    If it isn’t there, I’m not sure what it is seeing.

  • I can not activate my iphone 4 after installing the firmware ios 7, can not remember the password apple id, a check box is all

    I can not activate my iphone 4 after installing the firmware ios 7, can not remember the password apple id, a check box are all available, please look into this matter
    serial number TP113FG5A4S, imei 012657000548662

    Copied from my initial post:
    Then you'll NEVER be able to re-activate the phone. This is called Activation Lock & there is no way around it if you don't know that info.
    You can try & recover the ID here:
    https://iforgot.apple.com/appleid

  • Hi, i wanted to buy ipad 2 3g online from apple but it seems to be locked on AT&T... I want to buy it and go back home to Egypt. So I was wondoring if i can use a vodaphone sim card or is the 3g just limited to At&t thsnk u very much

    hi, i wanted to buy ipad 2 3g online from apple but it seems to be locked on AT&T... I want to buy it and go back home to Egypt. So I was wondering if i can use a vodaphone sim card or is the 3g just limited to At&t thank u very much.

    Thank you so much

  • Unable to install the Novell File Upload extension to upload directories

    Using Firefox 9.0.1 on Windows 7 I'm unable to install the Novell File
    Upload extension to upload directories.
    As per the pop-up help page, I've added
    extensions.install.requireBuiltInCerts in about:config and set it to
    false but that has made no difference, even after restarting the browser.
    I've also tried this with Firefox 9.0.1 on Mac OS X Snow Leopard
    (10.6.8) - unsupported I know - with the same result.
    Do I really have to use Internet Explorer? Urgh!
    Simon
    Novell/SUSE/NetIQ Knowledge Partner
    Do you work with Novell technologies at a university, college or school?
    If so, your campus could benefit from joining the Novell Technology
    Transfer Partner (TTP) program. See novell.com/ttp for more details.

    On 19/01/2012 18:11, craig wilson wrote:
    > You should trust the ZCM CA and the error will go away.
    > It's not expected to get that error.
    > Managed Devices especially will have loads of issues if the ZCM CA is
    > not trusted.
    So, with Firefox, first hitting http://<server>/zenworks/ after install
    displays
    --begin--
    This Connection is Untrusted
    You have asked Firefox to connect securely to <server>, but we can't
    confirm that your connection is secure.
    Normally, when you try to connect securely, sites will present trusted
    identification to prove that you are going to the right place. However,
    this site's identity can't be verified.
    What Should I Do?
    If you usually connect to this site without problems, this error could
    mean that someone is trying to impersonate the site, and you shouldn't
    continue.
    [Get me out of here!]
    > Technical Details
    > I Understand the Risks
    ---end---
    so I click "I Understand the Risks", [Add Exception...] then [Confirm
    Security Exception] at which point http://<server>/zenworks/ correctly
    displays and I can log in. Checking Tools | Options | [View
    Certificates] shows an (Unknown) server certificate for <server> with a
    Permanent lifetime.
    Is that what you mean by trusting the ZCM CA?
    Perhaps this is why Firefox 9.x is not a supported browser though I
    thought that was more to do with Mozilla treating major version numbers
    as minor ones? Gee if only Firefox hadn't automatically upgraded itself
    from 8.x to 9.x!
    Thanks.
    Simon
    Novell/SUSE/NetIQ Knowledge Partner
    Do you work with Novell technologies at a university, college or school?
    If so, your campus could benefit from joining the Novell Technology
    Transfer Partner (TTP) program. See novell.com/ttp for more details.

  • When I download firefox, using recommended setting, or my own, all the sub files/folders like plugins, modules, updater end up on the desktop as well as in the file location. And when I try to put them into the file location, they don't. And when I delete

    When I download firefox, using recommended setting, or my own, all the sub files/folders like plugins, modules, updater end up on the desktop as well as in the file location. And when I try to put them into the file location, they don't. And when I delete them, FireFox won't open. I tried deleting FireFox and reinstalling it multiple times, and a message pops up sometimes that says FireFox may not have installed correctly, so I follow the steps, but all the extra icons on my desktop don't go away. This has happened every time I have downloaded FireFox. The browser itself works, but I need to know how to get rid of these icons, but still be able to use FireFox. This is on a new computer, with Windows 7.
    == I downloaded FireFox. ==
    == User Agent ==
    Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.6) Gecko/20100625 Firefox/3.6.6

    Managed to solve this myself. Just went to properties > hidden.

  • How to use a custum permission in the .policy file

    Hi,
    I am stuck with the problem of having a custum permission that extands java.security.BasicPermission.
    I really want this permission to be checked from my .policy file, but when I try to include its location : c:\java_project\server\SpecialPolicy.class
    it pops a message that file is not found. I have tried dots, different slashes (back and forward) and still have no luck. I need this custum permission to be checked so that I can allow special access from a certain codebase so that say if I try a dangerous method I can just simply check in the code;
    this.getSecurityManager.checkPermission(new SpecialPermission("lol"));
    Also I need a paramater option, but I cant think of any since its not a FilePermission that takes a name and attributes (read, write..) what does BasicPermission take and if I extend it what attribute should I pass in. I dont really care about how this permission works, i just use it to restrict access to a certain functions in code that are ran from specific codeBAse.
    Please dont ask why I need this :)
    Thanks in advance, the documentation on how to add custum policies is simply NOT THERE. thus I have to bug people around.

    Hi
    If you just have to add another permission it is easy.
    Create a class extending the BasicPermission. Have an entry into
    the policy file like
    grant <Principal> {
    permission <CumstomPermission> "lol"
    }that should be all. If you do have a specific Principal, please
    do not forget to add the Principal to the relevant Subject after login.
    cheers
    Projyal

Maybe you are looking for