• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

TripleDES

 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Does anyone have, or know where to find source for TripleDES (DESede) encryption on J2ME? Funny thing is that J2ME has the Cipher package (e.g. for SSL), but it's not public...
I would like to use J2ME to control huge machines over the net, but this f..ing toy-implementation of Java seems to be designed for kids.
....And I can't use SSL due the two-level encryption keys (authentication + encryption).
br,
Jorma
 
author
Posts: 1436
6
Python TypeScript Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The Bouncy Castle package is what you are looking for. A short tutorial of that package (an eariler version) can be found in my JavaWorld article. An elaborated discussion on data security is available in my book
 
Jorma Ikonen
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
And thanks about the link to BC.
I took needed java sources from the BC's package to my project utilise Triple DES encryption/decryption to see what classes are necessarily needed to be in my Jar-package. Furher, I found that e.g. PaddedBufferedBlockCipher -> ParametersWithRandom uses java.security.SecureRandom what is not implementted on J2ME.
I think that SecureRandom is needed only while generating keys, not in encryption/decryption phase. Furher, I do not generate keys on J2ME-application and therefore I'm wondering what hell is needed to do to get this working on J2ME? Should I modify all classes which uses SecureRandom?
Br,
Jorma
 
Jorma Ikonen
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
... I have loaded wrong API on BC's Lightweight API!!! I should by eye glasses, ...
-Jorma-
[Deleted the offending language -- Michael Yuan]
[ September 19, 2003: Message edited by: Michael Yuan ]
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Language objection...
 
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I thought there�d be a language filter, just like in most forums I visit
 
Jorma Ikonen
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok + sorry! ... wasted time just pushed my self-control out of normal behaviour...
br,
Jorma
 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
Probably you should be aware that when using BouncyCastle and the SecureRandom class some security exceptions may appear. That's because you are not allowed to create clases in the java or javax packages.
The best way to solve this is to use an obfuscator which will rename your classes and remove or change the package name.
As a side effect you get a small MIDlet since BC is pretty big (and useful )
Regards
 
Jorma Ikonen
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, I already met the problem. Then I met new problems with the Marvin's obfuscator, but next trial with Retroguard worked ok. So, currently my midlet works very reliable each time when GPRS connection do not crash down...
-Jorma-
 
Carlos Quiroz
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
Still I'd recommend proguard over retroguard (notice that they started with the same codebase). In particular because proguard can eliminate dead code
Also it seems retroguard is not in active development (I may be mistaken)
Regards
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic