Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. Cryptography question

Cryptography question

Scheduled Pinned Locked Moved C#
questioncsharpdotnetalgorithmssecurity
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Mazdak
    wrote on last edited by
    #1

    There is a base class names DES for another class DESCryptoServiceProvider,I can use both for DES encyption like this: DES des = DES.Create(); or DES des = new DESCryptoServiceProvider(); My book say it is recommended to use first one because it create default cryptography service which it is latest version but second one is a defined way which is not surly latest version. Now I have a problem,I have a web service which has some encryption-decryption and this web service has a VB client and the VB client has its own encryption-decryption. The VB developer do his own part. Is that make change which one I use? Because he will/can not use .NET framework and he have to use cryptograohy API, I don't know the API's and I don't know the equivalent of first one. Also can I be sure if the cryptography's versions are grow the results of DES.Create() will be the same and it will generate the same decrypted value whith the constant KEY?(I mean only algorithm change but not the result) If I wrote myself both parts I could be sure about that but now one part in VB and I'm not sure about that. I hope that my problem is clear for you guys. Mazy No sig. available now.

    H 1 Reply Last reply
    0
    • M Mazdak

      There is a base class names DES for another class DESCryptoServiceProvider,I can use both for DES encyption like this: DES des = DES.Create(); or DES des = new DESCryptoServiceProvider(); My book say it is recommended to use first one because it create default cryptography service which it is latest version but second one is a defined way which is not surly latest version. Now I have a problem,I have a web service which has some encryption-decryption and this web service has a VB client and the VB client has its own encryption-decryption. The VB developer do his own part. Is that make change which one I use? Because he will/can not use .NET framework and he have to use cryptograohy API, I don't know the API's and I don't know the equivalent of first one. Also can I be sure if the cryptography's versions are grow the results of DES.Create() will be the same and it will generate the same decrypted value whith the constant KEY?(I mean only algorithm change but not the result) If I wrote myself both parts I could be sure about that but now one part in VB and I'm not sure about that. I hope that my problem is clear for you guys. Mazy No sig. available now.

      H Offline
      H Offline
      Heath Stewart
      wrote on last edited by
      #2

      The whole idea of cryptographic standards - or any standards at all - is that they are the same wherever they are implemented. Crypto algorithms like RSA and DSA are standard. Don't worry about the implementation. So long as the key (i.e., the shared key in symmetric key or private key in asymmetric algorithms) you should have no problems. And again don't worry about the cipher text being different from encrypt and encrypt - the initialization vector is supposed to change in order to randomize the results and make it harder for crypto analysts to crack the key. Again - these are standards. Besides, the cryptography in .NET uses the Crypto API for various things.

      -----BEGIN GEEK CODE BLOCK----- Version: 3.21 GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++ -----END GEEK CODE BLOCK-----

      M T 2 Replies Last reply
      0
      • H Heath Stewart

        The whole idea of cryptographic standards - or any standards at all - is that they are the same wherever they are implemented. Crypto algorithms like RSA and DSA are standard. Don't worry about the implementation. So long as the key (i.e., the shared key in symmetric key or private key in asymmetric algorithms) you should have no problems. And again don't worry about the cipher text being different from encrypt and encrypt - the initialization vector is supposed to change in order to randomize the results and make it harder for crypto analysts to crack the key. Again - these are standards. Besides, the cryptography in .NET uses the Crypto API for various things.

        -----BEGIN GEEK CODE BLOCK----- Version: 3.21 GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++ -----END GEEK CODE BLOCK-----

        M Offline
        M Offline
        Mazdak
        wrote on last edited by
        #3

        Thanks Heath. :) Mazy No sig. available now.

        1 Reply Last reply
        0
        • H Heath Stewart

          The whole idea of cryptographic standards - or any standards at all - is that they are the same wherever they are implemented. Crypto algorithms like RSA and DSA are standard. Don't worry about the implementation. So long as the key (i.e., the shared key in symmetric key or private key in asymmetric algorithms) you should have no problems. And again don't worry about the cipher text being different from encrypt and encrypt - the initialization vector is supposed to change in order to randomize the results and make it harder for crypto analysts to crack the key. Again - these are standards. Besides, the cryptography in .NET uses the Crypto API for various things.

          -----BEGIN GEEK CODE BLOCK----- Version: 3.21 GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++ -----END GEEK CODE BLOCK-----

          T Offline
          T Offline
          TuringTest1
          wrote on last edited by
          #4

          wonderful piece of code, that Crypto API :):-O;) ________________________________________ Gosh, it would be awful pleas'n, to reason out the reason, for things I can't explain. Then perhaps I'd deserve ya, and be even worthy of ya.. if I only had a brain!

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups