Old Problem but still no avail

hello..I'm trying on a program which encrypt some random bytes with secret key and then decrypt with a public key using RSA. However I encounter a problem is that it raises this error:
Exception in thread "main" java.security.InvalidKeyException: Can only encrypt w
ith an RSAPublicKey.
at javax.crypto.Cipher.init(DashoA6275)
So how can I encrypt some file using private key??
(THis scenario is like SSL.)
IF ultimately I can't do that, how can I implement the SSL operation??? I dun want to use other provider..
pls enlighten..thanks in advance

Sign a message means :
- get an hashcode of the message you sign
- encrypt this hashcode with the private key
Verify signature means :
- decrypt the signature with the public key
- get an hashcode of the message you sign
- compare the hashcode with the result of the decryption
with RSA key pairs you can crypt and decrypt with both public and private key.
You can use the private key to crypt, but it's very long.
You can exchange a session key in order to use a symetric algorithm to secure some data (like SSL protocal).
An ASN1 encoding of an hascode is quit similar to a symetric key bytes :
the RSA encryption will not be longer.

Similar Messages

  • I want to get rid of everything in itunes , music, movies etc and start afresh. Ive deleted all old libraries but still there is stuff in iTunes. Please help me start afresh?

    i want to get rid of everything in itunes , music, movies etc and start afresh. Ive deleted all old libraries but still there is stuff in iTunes. Please help me start afresh?

    Please do not delete any files from the HDD without having a current backup.
    I'm not sure what you mean when you say you've "deleted all old libraries." Can you explain that?
    If all you are wanting to do is empty the iTunes library of all music, video playlists, etc. the easiest way is to quit iTunes and, in the Finder, go to ~/Music/iTunes and simply move the .itdb, .itl and .xml files to the trash. Launch iTunes again and the library will be empty.
    You should be prompted to add content, so you can let iTunes scan the HDD if you like.

  • ITunes could not connect to this iPhone because an unknown error occurred (0xE800001). I'm directly connected to the my Laptop USB 3.0 so no USB problem 1 time I upgrade ios 4.1 (8B117) because of this problem but still haven't good result

    iTunes could not connect to this iPhone because an unknown error occurred (0xE800001).
    I’m directly connected to the my Laptop USB 3.0 so no USB problem 1 time I upgrade ios 4.1 (8B117) because of this problem but still haven’t good result  
    anyone please halp me As soon as possible

  • 10.5.2 fixed old problems, but caused many new ones!

    I had many of the problems reported using Leopard, including multiple daily OS crashes. After they released 10.5.2, I did an ERASE and INSTALL, reinstalled Leopard and performing all of the updates in a timely manner, repairing permissions after each update, etc. After re-installing all of my apps, including FCP Studio 2, I started to test everything. First thing I noticed was that upon opening iPhoto, iTunes, Final Cut Pro and Soundtrack Pro...there were no windows that opened! All of the apps opened, but displayed no windows that went along with the apps. I made sure that all of the windows were "active" in the menu bar, but none of them showed up on the screen. After a re-start, I got most of the apps windows to appear(iPhoto was still not working). Now keep in mind, I had never had anything like this happen in 10.5.1. I also began to notice a 1-pixel-thick horizontal line that appeared on the lower third of my screen, either just on the desktop picture, or sometimes just in the current open application window. Sometimes the line was a solid green, other times it was broken up and black. I also just experienced another "screen going black" OS crash...if that's what it was.
    I have been using Apple's products back when I was mocked for buying anything Apple, and I have never had problems like this until they became "mainstream". It seems the more popular Apple becomes, the worse the quality of their products becomes. At least in their "computer" branded products. Anyone else experiencing this?

    Sorry but I've not seen anything like this. I've upgraded my own personal entourage of computers to Leopard (we have 5 at home), at work (a lab of 25 plus at least 10 staff members), and helped or advised a slew of friends and customers.
    Have I seen problems? Yes but all of them have been attributable to known factors and fixable. The default Upgrade mode turns out to be a big no no with Leopard. Running old utilities that require updates or upgrades are another. Marginal RAM reared its ugly head again, though not as badly has it has in the past. I recall one issue that I tracked down to a very full hard drive - I recommend leaving at least 10% or 10GB free which ever is bigger.
    Your mention of the horizontal line could indicate a hardware problem. Running the hardware diagnostics disk would be a good idea. Unfortunately, the tool that Apple gives us is 100% reliable at indicating there is a problem but sometimes a problem does exist and the program fails to flag it. This is particularly true of RAM, so you should keep this in mind as you move forward.
    If you pass the diagnostics test, I'd say (ugh) format and reinstall only OS X. Unplug everything but the mouse and keyboard and keep it that way until near the end of your rebuild process. Go online, configure your email, and see if things are okay. If so, while online check out the status of updates of all your software. Download as needed. Now slowly install new software and test the computer a bit before going on to the next. Slowly add peripherals and their drivers. WIth luck, all will go well this time. If not, by taking it slow and testing at each step, you should be able to isolate the offending culprit.

  • I aam not allowed to send emails due to a message that says I have exceeded the storage limit on my mailbox. I have already deleted all old stuff but still get the message

    I am not allowed to send emails due to an error message that says I have exceeded the storage limits in my mailbox. I have already deleted all old mail, sent mail, etc. but still get this message. Please help!!

    Firefox doesn't do email, it's a web browser.
    If you are using Firefox to access web mail, you need to seek support from your service provider or a forum for that service.
    If your problem is with Thunderbird, see this forum for support.
    [http://www.mozillamessaging.com/en-US/support/]
    or this one
    [http://forums.mozillazine.org/viewforum.php?f=39]

  • My iTunes randomly cuts off songs at the end. I've tried to create a new library and reimport my old library, but to no avail. Can anyone help? :)?

    Hi, I am using a MacBook Pro, and downloaded the new iTunes update. I have OS X Lion 10.7.4. It all of sudden is randomly cutting off some songs before the very end of the song. I've tried to read past posts and create new libraries and re-import the old one, but it doesn't seem to help. It is not all of my purchased songs, nor is it all of my downloaded from CD songs, it's just a particularly random set of songs (I haven't checked them all, but it happens every 5 songs or so when I play the whole library on shuffle). This never happened to me before with other versions of iTunes, and when I called the support line the guy says he has never heard of this problem before... ! 
    I have 3000 songs, so I don't want to manually bring each one in again. I am also not super technologically brilliant, so if you have had this problem too and have a simple answer, please help !!!

    I have a similar problem with Itunes - the funny thing is it only does it on my Mac and not my PC running Windows 7 - seems strange the Apple software runs better on a Windows computer.  There are other posts about this here on the forums that have been running for two years with no solution - and I was just about to buy a new Ipod - oh well.

  • As soon as I open Firefox it crashes, even in safe mode. I've tried all the options to fix the problem but to no avail. My crash report number is: 1326236186. I hope this helps!

    Firefox crashes as soon as I click on the icon. Even in safe mode. I've tried all options of resolving this problem but nothing is working. I really hate using Safari and Chrome. Please help!

    Scan your computer in safe mode for bots, malware, trojan's and viruses. Remove any Found and reboot. If Problem still exists, go to control panel, add/remove programs remove firefox. and then download and reinstall firefox. Remember to always close as many running programs like messangers and widgetts when installing any program. This should fix your problem. only other option is to do a system restore to when you were not having any problems, this works 90% of time.

  • May Be Old question but undo not available in Acrobat X Standard

    This maybe a tired old question but I can not find a straight forward answer. In Acrobat X standard, I have some large pdf's that I created by merging many smaller PDF files together that were MS Word files converted to PDF. When I want to update something I go back to the orginal Word Doc and edit, resave as pdf then I replace the page with the new PDF. Once in a blue moon I screw up and replace the wrong PDF page (it happens). But lo and behold no UNDO, I don't get it, in Acrobat 9 it worked but I had the professional version of that. I had not saved the file or anything, so why no undo? Is it because I have the standard version?
    If I edit the PDF file with the text editor then the undo function lights up but I would think something as simple as a page replacement should be able to undo as long as you have not saved it?

    If the plug-in is not even loaded, chances are that something goes wrong
    when the OS tries to link the plug-in to dynamic libraries. Verify that you
    have all the libraries installed that are required to run the plug-in.
    Karl Heinz Kremer
    PDF Acrobatics Without a Net
    PDF Software Development, Training and More...
    [email protected]
    http://www.khkonsulting.com

  • Unable to sync or backup my iPad2 with the new iTunes. I keep getting the error ""iTunes could not back up the iPad because the backup was corrupt or not compatible with the iPad.". I've deleted all the old backups but still get this.

    I'm totally frustrated by iTunes and don't know how to solve my problem. Like a lot of people on here I'm not able to sync or back up my iPad2 with my iTunes (version 10.4.1.10). I'm running Win 7 Ultimate 64 bit. My iTunes worked just fine until the 10.4.xx updates came out and since June I've not been able to back up or sync the iPad2.
    When I connect and try to sync I get the error message, “iTunes could not back up the iPad because the backup was corrupt or not compatible with the iPad.”
    I've deleted all the old backups so there are none on my system. I've deleted iTunes and re-installed the 64bit version several times but it has not made any difference. I've read and followed several suggestions on these boards about how to remove and reinstall everything but none have worked yet. I'm stumped here.

    I had the exact same thing with my shuffle - same error message saying that it was corrupt so I restored it (wiping everything in the process) and the same message came up as soon as it reloaded. Thank god I didn't try it with my iPod or iPhone first. So many issues with this new version of iTunes!!!!!!!!

  • I recently updated to the latest version of iTunes and now get a message saying 'Registry settings for iTune drivers are misng for Cd burning' I have uninstallled and reinstalled iTunes and tried everything to repair the problem but still have no optical

    I am using OS  64 bit Windows Vista Home Premium and recently updated the latest version of iTunes. (I only have this CD burning software on my Laptop). Ever since updating, I  received the message 'Registry settings for the iTune drivers are missing for CD burning'. The drivers for Lower and uppper filters in the registry are missingand I now have no optical drive.  I have unistalled and  reinstalled Itunes and manually entered the filters. Have tried everything including something called GEAR driver installer which was suggested on several technical sites. Everything  was working fine in iTunes until I updated it.. It's strange I can still import music but not burn?? Friend s have told me they have ha dthe same problem when updating iTunes but resolved the problem by uninstalling/reinstalling or altering registry keys.
    Today I went to use my Epson Printer and now have problems with it not working. I decided to uninstall/ install printer software and  still can't get it to work either. I may be wrong but his all seems connected to me?
    I have been trying for days to get  telephone support and  been told today you have to pay
    Please can someone help me before I throw the lot out the window!!!!

    Many thanks b Noir
    This is a copy of ONEof the keys  in the registry I changed  as told by Apple support today. I also have changed others as instructed by GEAR  software support to manually delete GEAR drivers (that I had installed but couldn't delete some of the others  they mentioned from Windows system 32. Then some bright spark at work told me I need the Gear drivers so  I downloaded the software and installed again.
    Sorry, just this minute went to insert image  and it is giving me a message saying this sort of content  is not allowed?.
    The most recent key I altered is in: HKey _local _machine. System\class - 4D36E965-E325-11CEBFC1-08002BE10318. Upper Filter data: Upper filter NTIDrvr  SiRem GEARAspiWDN.
    The GEARsoftware info about manually deleting  GEAR drive is from:
    http://www.gearsoftware.com/wiki/index.php?title=DRIVERS:_Windows_-_Updating%2C_ removing%2C_64_bit_versions%2C_etc
    I hope you can help

  • Desktop shortcuts and folders disappearing but still virtually available on SSD

    Hi,
    I've had a bit of an issue today where I loaded up my PC (Windows 7) and half my desktop has disappeared, At the moment as I run dual monitors, when I first attached my second monitor many months ago some of my desktop icons were chucked to the right and
    some to the left but with this case they have disappeared.
    When I shut down my PC last night everything was okay and nothing was missing (I did install a few game updates last night but that is the norm for me) Today, the shortcuts that are missing are still available on my SSD (:D) drive which is set as first boot
    order. I can search to the desktop folder on the SSD and all shortcuts are intact. The desktop currently running is from my standard hard drive (:C) which was more of a backup and for space. On the "My Computer" screen i'm 100% sure my SSD was first
    in the list (left in list) but it appears now to have switched with my regular hard drive
    Can anyone tell me a way to reverse this? i've tried system restore but as it assumes my last restore point was the windows updates that installed today (As the only restore points it looks for is the hard drive and not SSD) 
    I would really appreciate any help. 
    Thanks

    Hello Jason2710,
    This can happen if the the System Maintenance troubleshooter detects the shortcuts as broken.
    For more information, please refer to the following article.
    https://support.microsoft.com/en-us/kb/978980
    Best regards,
    Fangzhou CHEN
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • How do I get endnote to work, I have downloaded the plugin but still not available, How do I get endnote to work, I have downloaded the plugin but still not available

    Trying to get endnote to work, I have downloaded the required plugin from Apple website but I still can't open endnote or create a list of references etc. I notice on the webpage it says endnote is sold seperately? Can anybody help with this issue?

    You have to buy the EndNote application. http://www.endnote.com/
    Or are you having problem just to add endnotes or footnotes. Read about it on pages 55-59 in the Pages User Guide. It is downloadable from your Pages Help menu.

  • I have a working problem, but still need some help

    import javax.swing.JOptionPane;
    class testing
      public static void main(String args[])
        int firstNum = 0, secondNum = 0;
        int evensTotal = 0, oddsTotal = 0;
        while(firstNum >= secondNum)
          int num = Integer.parseInt(JOptionPane.showInputDialog("Enter a number"));
          if(firstNum == 0) firstNum = num;
          else secondNum = num;
        for(int i = firstNum; i <= secondNum; i++)
          if(i % 2 == 0) evensTotal += i;
          else
            System.out.println("odd number = " + i);
        System.out.println("Even numbers total = " + evensTotal);
        for(int i=firstNum; i<= secondNum; i++)
      if( i % 2 == 0 ) evensTotal=i;
         System.out.println(i+" squared is " + (i*i) );
          for(int i = firstNum; i <= 10; i++)
              if(i % 2 == 0) evensTotal += i;
          else
                  oddsTotal += i*i;
        System.out.println("Odd numbers(squared) total = " + oddsTotal);
        System.exit(0);
    }I have everything I need, but I don't want it to display the even numbers squared. I want it to display the odd numbers squared. And also at the end I need to Output all of the uppercase letters. Any ideas of what that means or how to go about it??
    By the way. The program outputs the following when I use firstNum=1 and secondNum=13:
    odd number = 1
    odd number = 3
    odd number = 5
    odd number = 7
    odd number = 9
    odd number = 11
    odd number = 13
    Even numbers total = 42
    2 squared is 4
    4 squared is 16
    6 squared is 36
    8 squared is 64
    10 squared is 100
    Odd numbers(squared) total = 165
    Edited by: mk9000 on Oct 29, 2008 9:09 PM

    import javax.swing.JOptionPane;
    class testing
      public static void main(String args[])
        int firstNum = 0, secondNum = 0;
        int evensTotal = 0, oddsTotal = 0;
        while(firstNum >= secondNum)
          int num = Integer.parseInt(JOptionPane.showInputDialog("Enter a number"));
          if(firstNum == 0) firstNum = num;
          else secondNum = num;
        for(int i = firstNum; i <= secondNum; i++)
          if(i % 2 == 0) evensTotal += i;
          else
            System.out.println("odd number = " + i);
        System.out.println("Even numbers total = " + evensTotal);
        for(int i=firstNum; i<= 10; i++)
      if( i % 2 == 0 ) evensTotal+=i;
      else
         System.out.println(i+" squared is " + (i*i) );
          for(int i = firstNum; i <= 10; i++)
              if(i % 2 == 0) evensTotal += i;
          else
                  oddsTotal += i*i;
        System.out.println("Odd numbers(squared) total = " + oddsTotal);
        System.exit(0);
    }Ok. I figured out how to display the odd numbers squared. I was forgetting to place the else after the if statement. But I still don't understand what my teacher could be talking about when she says "the last step is to output all the uppercase letters"
    Any help here? It makes no sense to me. It's all numbers. How could I output any uppercase letters?
    Edited by: mk9000 on Oct 30, 2008 5:53 AM

  • Macbook pro running slow - spinning wheel but still space avail?

    Is there anything that I can do to speed up my macbook pro?
    System is up to date, and there is space available. I've checked CPU - I think there is probably a lot of double ups on information stored on computer but not sure how to do a clean-up without loosing originals....
    Any help would be greatly appreciated? In laymans terms if possible, as clearly I'm not as technically knowledgable in this area (also don't have much &'s to spend on clean-up software - so cheaper options or ability to fix thru what is already available to me is best!)
    Thanks in advance

    http://www.ehow.com/list_7483714_ways-up-macbook-run-faster.html
    I like to follow this one.
    No information will be lost and i've had good luck with it in the past.

  • This Question is at least 2.5 years old.  But still an issue.  I have an early 2008 and mid 2010 13 inch macbook pro running iTunes 10.7.  Itunes on both machines doesn't recognize blank cds or allow me to import from a music cd when I insert it.

    I have an early 2008 and mid 2010 13 inch macbook pro running iTunes 10.7.  Itunes on both machines doesn't recognize blank cds or allow me to import from a music cd when I insert it.

    iTunes does not use the .xml it uses the .itl
    If you are sure your old library file migrated across (does the file size and modification dates suggest it has?) start iTunes while holding down the option/alt key and guide it to the .itl file to get it to use that one.

Maybe you are looking for

  • Microphone on Macbook pro does not work in windows 7 with parallels

    I recently purchased a Macbook pro with retina display, and installed windows 7 on the macbook with parallels desktop 7.  I found out my microphone was not working correctly inside windows, I did bought my laptop to Apple store, at first we thought i

  • Creating a booking diary

    I am currently building a website for a client, who has asked me about integrating a booking diary. I will give a brief description: The client has a 'feel good salon', they have two complimentary therapy rooms which they rent out to approximately 6

  • About rtp and jmf

    Hello,I'm now working on my graduation paper which refers to the RTP,and JMF matter.Because this is my first time to deal with this, i don't know much about that.And what i'm now trying to transfer is a file like *.au by using the sample code VideoTr

  • Domain local groups with members from other (same forest) domains?

    I'm confused about granting access to a share via a domain local group that contains members from other domains. Consider this scenario: Joe Smith logs into his own domain (DALLAS.CORP.COM) and his token gets the DALLAS\sales global group. A share (n

  • Any way to Lock the Decoration Free Label in place so that the Clean Up Diagram process doesn't move it soemplace unreasonable?

    Any way to Lock the Decoration Free Label in place so that the Clean Up Diagram process doesn't move it soemplace unreasonable? The Clean Up Diagram process moves things to very strange places and often makes the diagram more complicated than it need