2

Using official tutorial i understood the main principles of Java Cryptography Architecture. But neither the officials nor internet gives me anything distinct about creating my own provider and implementing some crypto algorithms.

I wonder if anyone can give me the source code of a simple security provider and/or a source code of some algorithm, which is used by this provider.

Overall, the main target is : a provider class ( simple one, not the complicated like SunJCE ) and a bunch of classes ( or one class ) with cryptography algorithm implementation ( with all it's doFinal and other method, whatever the implementation class needs )

Roman Semin
  • 21
  • 1
  • 3
  • 3
    Do not invent new crypto algorithms, they are weaker than all algorithms created and reviewed by many cryptographers. – Tobias P. Sep 24 '11 at 12:33
  • 1
    @Tobias P.: That is like "Don't make new music, all good music has already been written". His new algorithm will probably fail, but there is a chance of 0.0000001% for a success story. – ott-- Sep 24 '11 at 12:49
  • 2
    Look at [bouncycastle](http://www.bouncycastle.org/) for source code. – home Sep 24 '11 at 12:52
  • 2
    @ott: and with a probability of 99.9999999% his algorithm is totaly weak and easily attackable - like all custom cryptographic algorithms not created by cryptographers. Music is a bad example while it's attractivity depends on personal taste in music but cryptographic algorithms are mathematic problems, so there's no personal choice, only facts. – Tobias P. Sep 24 '11 at 13:19
  • 1
    The thing is that THIS is my diploma subtask. So that i definetely need this source code. Just to understand how it works – Roman Semin Sep 24 '11 at 13:34
  • @Roman Put info like that in your question next time to avoid all this comment spam :) – Philipp Reichart Sep 24 '11 at 14:50

1 Answers1

1

Try How to Implement a Provider for the JavaTM Cryptography Extension.

Philipp Reichart
  • 20,771
  • 6
  • 58
  • 65
  • 1
    Thank you, i've studied it thoroughly, but it is not enough. I need full source code, not the tiny advices given there. And more of it, i need algorithm implementation to understand how exectly i need to impelement other algorithms, to understand how provider understands my algorithm class, how cipher understands it and so on – Roman Semin Sep 24 '11 at 15:46
  • Then check out the bouncycastle source as @home suggested in the comments to your question. They have implementations for JCE providers and algorithms :) – Philipp Reichart Sep 24 '11 at 16:36