Secret and random key

Which algorithms use a secret key and a random key?
Which of these are implemented (or at last con be implemented) in J2SE and J2ME?

Which algorithms use a secret key and a random key?Secret key - symetric algorithms such as DES, AES and Twofish.
Random key - asymetric algorithms such as RSA are normally used in conjunction with a symetric encryption algorithm using a random session Secret key.
Which of these are implemented (or at last con be
implemented) in J2SE and J2ME?On J2SE run
import java.security.*;
import java.util.Enumeration;
public class ListAlgorithms
    public static void main(String[] args)
        // Add any provider you wish to list
        Security.addProvider(new com.sun.crypto.provider.SunJCE());
        //Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider());
        //Security.addProvider(new cryptix.jce.provider.CryptixCrypto());
        System.out.println("Providers -");
        Provider[] providers = java.security.Security.getProviders();
        for (int index = 0; index < providers.length; index++)
            System.out.println("    " + providers[index].getName());
            Enumeration en = providers[index].propertyNames();
            while (en.hasMoreElements())
                String alg = (String)en.nextElement();
                 if (alg.matches("(?i)Cipher\\..*"))
                    System.out.println("        Alg = " + alg);
}I know nothing about J2ME.

Similar Messages

  • I have a macbook pro with OSX Mavericks 10.9.5 and some keys that are not working. Specifically, the enter/return button, the "p", "0", ";", and all the function keys.  What's really weird is that happens randomly.  I've never spilled anything on it

    I have a macbook pro with OSX Mavericks 10.9.5 and some keys randomly are not working. Specifically, the enter/return button, the "p", "0", ";", and all the function keys.  What's really weird is that happens randomly.  I've never spilled anything on it, and I can't for the life of me figure out how to fix this.  Can anyone help?  of course this happened after my warranty expired.

    **update**
    I don't know if this will help someone but I am posting this for that purpose.  In the past when I first had this problem, I'd read a post somewhere (sorry, long ago, don't have the link) where an individual was having the same problem and they stated that when the MBP got heated, that's when the keys would stop working, and they went into the MBP and jiggle some stuff around (a specific wire, I'm not electronically inclined so I know NOT of what they spake!).  Well I didn't want to do that but it always stuck in the back of my mind.  I had given up, really, and was planning to take my MBP to the apple store.  But by chance one night I left my MBP on the floor where it's cool, and when I turned it on, the problem went - poof! It seems there was some validity to the post that spoke about heat, because my problems started when I would stream foreign dramas on my MBP for hours at night, and I would hear the fan going off all the time, and in the mornings, my "p", "enter", "0", ";", and all the function keys would stop working. 
    So, maybe try keeping the MBP in a cool place when it's off.  Since I've started doing this overnight every night (keeping it on the cool floor, out of reach of any big feet), I have not had a single problem with my keyboard.
    Hopefully this might help someone.

  • When I shut the lid to my computer and then open it again the screen comes on and then goes black and I have to press random keys to make it show again.  Does anyone know why this is happening?

    When I close my lid to make the computer sleep and I open it back up again when I am ready to use it the screen turns on and then turns black.  I have to press random keys to make the screen show again.  Any help is greatly appreciated!

    First, before you sleep your MBP, make sure you either scroll down the Apple menu to sleep your machine, or do it even more easily by pressing CMD-OPTION - DiskDrive (upper right hand corner of your keyboard). I wouldn't just close your machine to let it sleep.
    It's hard to know exactly what's happening, but here are a few pointers.
    1. Go to System Preferences/Energy Saver and make sure you've set a sleep time of more than two or three minutes. Your machine may be trying to sleep too early. In the same preferences, set Computer Sleep to more than ten minutes, to make sure you don't get an unintentional sleep.
    2. Take a look for third-party applications you might have installed.
    Post here with your results!

  • Hello, my little sister just spilled french vanilla on my mac and i cleaned it and turned it off , but at random time it opens and some keys arent working what do i do ?

    Hello, my little sister just spilled french vanilla on my mac and i cleaned it and turned it off , but at random time it opens and some keys arent working what do i do ?

    Take it to an Apple Store, you can't do anything yourself.

  • Satellite - randomly the arrow keys, question mark key and z key will not work

    Sometime the arrow keys, question mark and z key work fine (like now) and sometimes they just don't work at all (like a minute ago).  I will just be typing and they will work and then just stop working, then work again.  They either all work or all do not work. This has been happening since about a week after I got the computer.  It is so annoying.  Can you please help me fix this problem?  I have a Satellite T135-S1309.
    Many thanks.

    Hi, 
    I've posted recently about keyboard problem, and have tried everything as everybody else, finally and oddly :-) the solution for my problem was to reconnect little flat cable that connects keyboard and MB :-D shown in step 10 on the following link:
    http://www.irisvista.com/tech/laptops/Toshiba-Satellite-X205/take-apart-laptop-2.htm
    ..so maybe your keyboard somehow strangely detached itself from mother-board just a bit and started creating all sorts of strange problems as mine... one cable line was without contact because flat cable was not attached properly anymore and mentioned keys stop working... I have also downloaded keyboard tester software that helped me find all keys and combination of keys that stop working ... so guys, try that and good luck!    

  • The u, j, m and 7 keys on the keyboard are not functioning properly on my macbook air. Please Help!

    The u, j, m and 7 keys on the keyboard are not functioning properly on my macbook air. In its place are a random assortment of keys (Ex - u = "eqrw" or "IOUY"). This randomly happened when logging back in after sleep mode. No liquid damage at all. Please help!

    OK, I fixed the problem by doing a SMC (System Management Controller) reset as follows:
    1. Powered off my MacBook and removed everything connected except for the power chord.
    2. When powered off, I held "Shift" + "ctrl" + "Option" + "Power button" for 5 seconds or so until the little light on the front started to blink rapidly.
    3. Powered up my Mac, which took a little longer than usual to start and tested the "missing" keys which now works perfectly again.
    Just added another couple of years usage with my aging mac :-)

  • E and C keys on wireless keyboard activate Mission Control

    I just set up a wireless keyboard with my Macbook Air. For some reason, the E and C keys activate Mission Control at random times. I went to System Preferences > Keyboard > Keyboard Shortcuts and restored everything to default but it still doesn't fix the problem. I also can't find any direct associations between these keys and Mission Control in the Mission Control setting. Help!

    In case anyone is curious, I solved this issue by upgrading to OS X 10.6.4. The brightness and volume function keys now control these functions properly.

  • Weird Z and Y key swap and arabic filename problems in Illustrator CS3

    Hi
    I am having some very weird problems with Illustrator CS3.
    At completely random times, the software starts to think my Y and Z keys have swapped places. i.e. When I type anything or use any shortcuts, the opposite letters appear and are used.
    Also from time to time, when I save a file, the filename is written in Arabic and I have to rename the file again in Explorer to correct this.
    Both of these problems are random and a restart or Illustrator usually fixes both of these. But what a pain and waste of time.
    Anyone else getting problems like this?
    Oh, I'm using Windows Vista.
    Thanks
    Mr M

    My guess is, it is related to Windows. Try to press shift and ctrl at once if the problem occurs. The keys should be switched back...
    You have probably installed more than one keyboard in Windows. Shift-ctrl is the standard way to switch between them. You can change this in the Windows keyboard configuration file.
    I had this problem with a German and a VS keyboard installed.

  • Arrow Left key and arrow Up key and fn key not working properly !? Lenovo G580 PLEASE HELP x_x !

    Hi guys i have a Lenovo G580 im not sure which version but i can tell you its intel i.3  and its got usb3.0 on it and 500gb hdd. 2.20Ghz  4.00RAM.   
    been days that i try to solve my Fn Key problem and also the arrow left and arrow up keys < i was using Win8 and downgraded to Win7 last week and that problem has occured since ,it misbehaves and it only works for a short amount of time it randomly works those keys FN.arrow up/left keys randomly they work , i upgraded again to Win8.1 now for the first few boots evrything worked well fn key and arrow keys np.< and now again it stops working.. and btw. whenever i press hard against it it would work pressing down the fn and arrow left/up keys when i press really hard it works but then again it doesnt Soo end of the story its not functioning properly and i have Energy management and Display driver HD 3000 installed and i still got this problem .. is there any fix to this anyone please !? 

    Hey mate the keys are faulty nothing can fix it except for buying a new Replacement! , i fixed the problem simply by Replacing the KEYBOARD !  i went downtown and looked for a g580 keyboard and they didnt exactly have the same version g580 they had c or b580 i dont remmber what letter it was sorry ! but the thing is the whole keyboard layout of many Lenovo Laptops are the same just look one thats the same, cause mine wasnt for G580 but the thing is its still working perfectly ! only problem is the Screws didnt fit i had to cut out the sides of the screw hole thingies to make the keyboard fit in well in my G580 , Simply put all you need is a new keyboard replacement buy one they cost between 20-40$ worth it cause you wont have any faulty keys anymore evrything will work fine. no need to reinstall anything just replace it with new Keyboard. and Plus its easy to replace it by yourself. i replaced mine by myself easily. Problem fixed.

  • How to get the private and public keys to use recaptcha?

    I have registered with google to get a recaptcha for my website. All I got was the site key and secret key! Though I need to get the public and private key for muse!

    Hello,
    Please use site Key as "Public Key"and Secret key as "Private Key".
    Regards
    Vivek

  • Bottom row of the keyboard is not working in a vertical orientation on the iPhone 3Gs. the "slide to unlock" and all keys on the calculator on both orientation works fine. I can use the keyboard on horizontal orientation.

    Bottom row of the keyboard is not working in a vertical orientation on the iPhone 3Gs. the "slide to unlock" and all keys on the calculator on both orientation works fine. I can use the keyboard on horizontal orientation. The tabs on bottom of all apps also work fine.
    I have already tried holding down the power button and home button for 10 seconds, but no difference.

    I've had this problem on and off for the last few weeks (around, but not directly related, to upgrade to 6.1...can't remember if was before or after)....I'm very convinced it's a software problem (as there have been times when the bottom row works perfectly, without any need to "press" differently or anything).
    However, it seems to be a rather resilient software issue, as a full restore does not consistently fix it, and it applies to more than just the keyboard; if I open a drawing app, there's definitely a row (about 4mm up from the edge of the screen closest to home button) where I cannot draw.
    It's happened 4 times now.  Originally it went away with a restore from backup, then worked for 2 more days.  The second and third times, it went away with a full restore (although I did two full restores in between those two restores that did nothing, so restore didn't consistently fix it)....and it seemed to return in the most random of circumstances. 
    I paid very close attention to what apps I was using the last time it was working so that I could spot which app, if any, might be causing the issue.  I deleted several apps, I stopped using the games and many other apps.   I only used three apps between it working fine and starting up as a problem again: mail, safari and messages.
    I was convinced it was mail, as it happened this morning when I picked up my phone off the bedside table to respond to a new email.  It was working when I went to bed.  I picked up the phone when it buzzed, hit the email app, hit reply and started to type....**** bottom row wasn't working again.
    However, tonight I did 2 things....one of them worked because it went back to normal (sorry, I don't know which as I was exasperated and trying a number of things). 
    The two things I did between a broken keyboard and a working keyboard were:
    1) adding a second keyboard (English(Canada)), changing to this keyboard, and changing back
    2) disabling Siri...and then turning it back on...and then disabling Siri's "Raise to Speak"
    In retrospect, I wonder if it actually was the "Raise to Speak" that was putting the phone into a weird state, and might explain why the phone would just "suddenly" start behaving strangely when I picked it up.  Of note, the "raise to speak" hasn't actually triggered Siri to come on in months anyway.
    Regardless, the keyboard is back to normal now...and I'm just going to leave "Raise to Speak" off.  I've put the keyboard back to just "English" with no alternates and Siri remains on otherwise without issue.

  • How to find modulus(n) and public key exponent(e)Sor

    I did the following code:
    import java.security.*;
    class keypair
    public static void main(String args[])
    try {
            KeyPairGenerator keyGen = KeyPairGenerator.getInstance("RSA");
            keyGen.initialize(1024);
            KeyPair keypair = keyGen.genKeyPair();
            PrivateKey privateKey = keypair.getPrivate();
            PublicKey publicKey = keypair.getPublic();
            System.out.println(publicKey);
    catch (java.security.NoSuchAlgorithmException e) {
    }It produced the following output:
    E:\java>java keypair
    Sun RSA public key, 1024 bits
    modulus: 104598424699919432698042124865237006532583108525971624656815039032375
    *68185931249899603942873174007833898125332457427834491991685017307342129730049040*
    *85039266578793603162921901877391682504673766949037045217194339504369288262569809*
    *64618725280325930282787918761626276736975012559809247463223114702205350103039131*
    public exponent: 65537
    How to parse modulus(n) and public exponent(e) from this output?
    Similarly when i print private key, it produces the following output:
    E:\java>java keypair
    Sun RSA private CRT key, 1024 bits
    modulus:          124578817060208658480856678950235831207402457067036419284514
    *60119309486714863949162442643168408523979997168613499493638925829235693238993015*
    *36861462235708805467117179894466762970147852286192228334073408407380525883650965*
    *26200137024900438305422984852314541271126647102071346646999343089444655087519613*
    *147762713*
    public exponent:  65537
    private exponent: 938527844532658207604152892230342202756165450473898580852699
    *91069268853864683730106242370135012901790500054313488639918623825755509450966957*
    *25996151023641565209086629652161258725723528561744214714448113895688480371394495*
    *69970533766968335232379493089928062691491508442909468663624841001227918721233934*
    *90451285*
    prime p:          128112715803862066344339615342766575233634768887073748611821
    *70613165835421234259251719401979554816266892921739504796026180704477109334458578*
    *924582228715587*
    prime q:          972415706579323990162180646771186062588725555167352041581263
    *11833654947284058644791019214876691698044764118648637510099163830088827138987158*
    *06445271350899*
    prime exponent p: 102053075991522697645186596252261651077210381075096084960080
    *01572103324900452503753532555651687424478224695551102238145517644352533224205327*
    *850477437666141*
    prime exponent q: 668659136319899226645386130685620335239039277715133737489656
    *56694442226518700929665796129185316864860876985624927131126216000167126890435269*
    *81971346772483*
    crt coefficient:  337801534982286124613379128447816812903646302193598735486466
    *78634104811105616496519276355880320340688935923186965279527763125244878069735173*
    *60542121091569*
    E:\java>
    From this output how to parse n and d, where d is the secret exponent or decryption exponent? Thanks in advance. Apologies, for posting in this forum instead of cryptography forum.
    Edited by: sowndar on Nov 28, 2009 3:12 AM

    sowndar wrote:
    From this output how to parse n and d, where d is the secret exponent or decryption exponent? Why do you think you need to parse anything? Why do you need the modulus and exponents?
    P.S. Extract the public and private keys from the key pair, cast them to RSAPublicKey and RSAPrivateKey as appropriate then look at the methods of classes RSAPublicKey and RSAPrivateKey to see how to get modulus and exponents.

  • Random keys on keyboard malfunction.

    Its been about three days since the problem first presented itself. Using my USB keyboard random keys such as ", w,3, num lock 5 key, capital p, and the right arrow key. I am using the on-screen keyboard to help me write this post.
    Things I have tried (according to research via google):
    Trying a different keyboard. Same problem, temporary fix for roughly thirty minutes.
    Trying a different USB port (front and back). Failed.
    Uninstalling keyboards on device manager. Rebooting, failed.
    Ease of access, keyboard shortcuts, sticky keys, filters. All of that now unchecked and failed.
    Turning computer off, holding power button down for 10 seconds
    Computer specs:
    Windows 7 Home premium 64 bit.
    AMD phenom II X4 945 Processor
    8GB RAM
    AMD RADEON HD 5450
    Keyboard: Steelseries Shift
    Mouse: Razer Deathadder
    Sidenote/story: I modified my Razer Deathadders lights on the razer logo and scrollwheel to have them off. As soon as I turned them back on my keyboard started working just fine. Then shortly after five minutes it went back to having problems.

    Because you mentioned in the sidenote/story that you adjusted the settings for your Razer Deathadder and had success for a few minutes,  have you thought to, perhaps, uninstall the software to see if the issue goes away permanently?  I don't know of any reason that it would have conflicts with anything else on your computer, but it might be an interesting troubleshooting step to try.  Other than that suggestion, I wouldn't know where to go with this...
    Good luck, I wish you the best with this.
    GeorgeFN
    I work on behalf of HP.

  • Touchpad and some keys won't work, other weird problems

    I have a Satellite A665. Last night it started randomly playing and then turning off a DVD that was in the drive. I ejected the DVD, but now there is a constant high pitched tone coming out of the speakers, and the touchpad can't be used to open anything. The touchpad can still control the cursor, and I can left click to open things. Also, the internet connection has disconnected and the key used to open the connection doesn't work. Pressing and holding the Fn key doesn't do anything. 
    Any suggestions? 
    Many thanks.

    Shut down the computer and try again. It almost sounds like something is on the keyboard, or maybe something got spilled on the keyboard. Try an external keyboard and see if that works. Try booting from the CD or a flash drive and see if that fixes the problem. If it does, this is a software problem. If not, it's the hardware. 

  • Black and random album

    ok so on my ipod 2nd generation i will tilt the ipod to look at my albums. I will scroll through them and some will either go black with no album art or some will have album art but will be black until you scroll to it. (it is there but only until you are on it)
    and sometimes my ipod just freezes, does the holding home key and sleep key at the same time hurt the ipod??

    Same thing happening to me as well. First started with random artifacts and or/ mostly flickering, then black outage, to now, computer won't even restart after 20 times. Usually a few PRAM restarts does the trick, but not always.
    This is getting worse than Vista. I'm positive now, it has to do with two different brands of graphics cards installed. I have the Xt1900 and 7300 GT (which, by the way, does NOT work in Vista despite all updated drivers/software, and 20 hours of your time) This is why I've been getting fully used to OS X the past few months, but only experiencing increasingly worsened issues such as the flickering, and now, terrible sleep/restart issues. I often wonder when this piece of metallic crap will simply die for good each reboot!!! LOL...jk (sort of)
    Do you all have dual displays who have experienced this problem? I am running those two cards mentioned above, with a Dell 30", two 22" Acer's, and occasionally using a 30" TV with DVI converted as a 4th monitor. Sometimes they work, mostly not anymore.
    Anywhow, this is my first time asking others of these problems! My MAC is almost 1 year old now, so maybe time to call service?? Or... Maybe I am missing something, so let me know if I have to pull some other tricks to make this crap work properly. Thanks all!
    MY MACHINE:
    Model Name: Mac Pro
    Model Identifier: MacPro1,1
    Processor Name: Dual-Core Intel Xeon
    Processor Speed: 2.66 GHz
    Number Of Processors: 2
    Total Number Of Cores: 4
    L2 Cache (per processor): 4 MB
    Memory: 5 GB
    Bus Speed: 1.33 GHz

Maybe you are looking for

  • How do I speed up my USB 3.0 port

    I have Windows 7 Home Premium 64 bit.  I am getting messages to the effect that my mass storage device will perform faster if I configure my USB 3.0 port.  How can I speed up my USB 3.0 port

  • UCCX - Abandoned calls

    I realised an anomaly which occurred in the system whereby we still have abandoned calls even when the phone is not ringing. Most of them are coming from general line e.g 1234. Could it be because it takes too long for the call from general line 1234

  • Why have you eliminated Favorites. Using Bookmarks is now a problem.

    # I just reloaded Firefox after major repair on my computer. Now there is no Favorites tab, just Bookmarks, and when I imported Favorites from IE it is jumbled between those in folders and those not. Also, I have to click on "Imports from IE" to open

  • "AU audio file player" stops playing after a few seconds

    Hi there, i use "AU audio file player" in my concert set up. It worked fine til yet, but now it just stops playing after a few seconds. The track is 3 minutes, but it stops suddenly. I tried to reload the tracks and tried loading the "AU audio fle pl

  • How/Why has Image fetcher's SAVE button imbedded itself into my website?

    SOMEhow, while adding content content to my business website, after saving my edits, the SAVE button (the one that appears when hovering over a pic) has become imbedded onto that page of my website - but in an area in which I have no access! I didn't