I want to work on the Rijndael algorithm using C#. Can anybody help me with this please?
I'm assuming you mean the Rijndael encryption algorithm - in which case RinjdaelManaged would be of use. The MSDN documentation (previous link) has examples, or there are lots of other references, for example see here.
I see (comments to other reply) that you are looking at implementing this yourself... some thoughts:
don't
why?
don't
Unless this is purely for interest, stick to the existing implementation. It will eat time, and potentially introduce security weaknesses. I can't think of a good reason to rewrite this.
sorry guys, but I just can not resist
from http://www.moserware.com/2009/09/stick-figure-guide-to-advanced.html
If you just need a working implementation check out the Rijndael Documentation on MSDN. The Rijndael implementation looks pretty convenient to interface with.
It's of course a different story if you are trying implement it yourself.
I am looking into the same that as per brian.
But the problem here is that all the rijndael samples available in the net are mostly using a Text File but is there any way of doing it in a Online Mode where when i get the data in the text box i convert it and put directly in to the database.
Any Hints on this would be much better and all the samples are defining the key from the Rijndael class itself, can't we provide the Key of our own.
cheers
Biju
Related
I need a c# application use encryption algorithms to encrypt/decrypt strings
such as DES,SDES,RC5..
I don't need an implementation for them I just need to use them in c#
I'm new in this field and need help
thanx
Find the urls below for DSE,SDES,RC5:
http://www.codeproject.com/Articles/19538/Encrypt-Decrypt-String-using-DES-in-C
http://www.codeproject.com/Articles/91628/Simplified-version-of-the-DES-Data-Encryption-Stan
http://www.codeproject.com/Articles/22518/Encryption-with-RC-Algorithm
Try taking a look at the System.Security.Cryptography namespace on MSDN - cryptography tasks and here MSDN - cryptography namespace. These should get you started with encrypting and decrypting strings, not sure if it covers all the algo's you are after.
I am just reading about AES. I don't know much about it.
In many posts on forms I see people asking implementation of AES (slowAES) while using Java.
Is that necessary?
No.
AES is an algorithm; it is independent of the language in which it is implemented.
That being said, implementing a cryptographic algorithm properly is not an easy task, and you should use the built-in versions of the API's you're using when you need encryption.
No it's just a cryptographic algorithm. Can be implemented in most if not any language.
No.
Since you tagged your question as C#, I'll add that in .NET you have System.Security.Cryptography.AesManaged class, which implements the algorithm.
Since AES is an algorithm you can implement it in any language of your choice.The things which can make a difference is your understanding of the specification and the availability of tools in particular language which can make it easy for you to implement AES.
We've developed a service, which sends e-mails... quite trivial at this step.
The next step will be: handling the bounces.
To implement this I need to add some information into the headers... Let's say it's a simple string (to keep the question really basic).
Which compression/encryption (.net-built-in prefered) should I take, when I'm looking for an algorithm which includes a checksum internally (I do not want to create a CRC or alikes and add it to the headers either) - so, changing some char of the encrypted/compressed string doesn't mean it's valid!
This need not be a "high-sofisticated" algorithm, as I just want a basic detection against changes/injections...
Just to be clear: There must be a chance to decompress/decrypt!
If you need to decompress/decrypt the message, you probably want a two-way encryption. I am not an expert here, but I think .NET comes with built-in support for AES, which is a Rijndael algorithm. You can get more information here.
Have you thought/read about OpenPGP? This SO thread might be a good starting point for you.
To answer the compression part of it, you may want to consider either the System.IO.Compression.GZipStream or System.IO.Compression.DeflateStream classes for compression. DeflateStream uses LZW compression that is (with a bit of hackery), compatible with ZLib (http://stackoverflow.com/questions/70347/zlib-compatible-compression-streams).
Using block tea (XXTEA), how can I convert encrypted text into human readable form?
string encryptedText = "ASDFSDAFSADFSDFSDFSDAF"; (assume it is in correct format)
I have the key/pwd also.
There is a Visual Basic implementation of the block tea algorithm here:
http://www.blog-dotnet.com/post/Tiny-Encryption-Algorithm-(TEA)-in-Visual-BasicNET.aspx
Block tea is meant to be easily implementable, so you shouldn't have a hard time converting that to C# (or compiling it into a .NET assembly with VB and then referencing it from .NET).
You should use the above as a base and then modify it as per the XXTEA algorithm, found here:
http://en.wikipedia.org/wiki/XXTEA
Again, it's meant as being easy to implement, so you shouldn't be too hard. If there are specific parts you are having issues with, please make sure to follow up.
Edit1: Core XTEA algorithm in C# with other parts in VB.NET at CodeProject
Tiny Encryption Algorithm and XTEA for the Compact Framework at CodeProject
Here is a JavaScript Implementation of the XXTEA algorithm and here.
Here is a Pascal implementation of all of them.
With all the other answers you should be able to put an implementation together. Once you do it, make a blog or report back here so it is recorded for the next guy!
I found this https://github.com/WooCode/xxTea which is a C# implementation, with unit tests provided. I haven't verified it's accuracy.
Could somebody please do a rundown of how to programmatically encrypt a config-file in .NET, preferably in C#.
What I would like to do is do some kind of check on an application's startup to see if a section is unprotected, and if it is, then encrypt it. This for both settings and connection-strings.
Also if anyone could list the types of encryption-providers and what is the difference between them.
I don't know if the code for doing this in a normal WinForms-application is transparent to doing this in ASP.NET.
To summarize the answers and what I've found so far, here are some good links to answer this question:
Encrypting Configuration Information in ASP.NET 2.0 Applications - 4GuysFromRolla.com
How To: Encrypt Configuration Sections in ASP.NET 2.0 Using DPAPI - MSDN
Please feel free to complement with other links, maybe some to WinForms- or WPF-applications.
There is a good article from 4 guys about Encrypting Configuration Information in ASP.NET 2.0 Applications
Hope this helps
The solution at below site working fine for me.
http://www.a2zmenu.com/Blogs/CSharp/How-to-encrypt-configuration-file.aspx
#TK: a hashing algo can only be 'guessed', not reverse engineered. One can only reconstruct the input to a hash value by completely guessing the input (apart from collisions, that is) This can be done by a rainbow crack for example (see an implementation of a rainbow cracker here)
I would say that a 3rd party encryption tool is not safer than the .NET framework encryption algorithms, these libraries just help you doing your job faster
I haven't used it myself, but the Microsoft Enterprise library has good encryption support that will possibly suit your needs:
http://msdn.microsoft.com/en-us/library/cc309503.aspx