• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Conceptual problem ?

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I need to make a component to sign (with coderanch, private keys)and crypt an info and send it from a web server to a web server. My first approach was to use a SignedObject but have some problems to put it on an input tag and send it by post to a servlet in the other side
(This is my first work with security issues...)
Then, I make the signature for my data(using SHA1withRSA), and try to put the data and the signature together, to crypt it all with RSA.
Mi first problem concerns to how put the data and the signature together, because when I cript the result and decript in the "other side", I don't know where the original data ends and the signature starts.
Tryed to put first, the size of the data, second the data and third the signature, but when I cript all (the result is a nice byte[]) and decrypt
in the other side the info is not the same !
Since "new String(byte[])" and String.getBytes() doesn't work like I expected ( byte [] a --> String s --> byte[] b ==> a != b ), I need to disturb the peace of the ranch and make this silly question !!!
Somebody could help me ?
Again, this is my first approach to security and JCE, I send two days reading about security, certificates, algorithms, providers, signatures, keys (etc...) and this is my last resource...
Thanks for reading my long, very long post.
Saludos:
Carlos.-
 
Carlos Schweizer
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
... ok, ok ...
... take a number please !!! BACK !!! ...
so bored to reply my own message...
Mooses, it's done, finally I make it work, it wasn`t so easy(working with a damaged MyEclipse without debugging tools), and there are a lot of byte [] <--> char [] conversions.
Thanks again to those who spend the time reading my post, and all of the people who take a while to answer, in this and in the others forums.
 
reply
    Bookmark Topic Watch Topic
  • New Topic