Click here to Skip to main content
16,010,553 members
Home / Discussions / C#
   

C#

 
GeneralRe: Getting this simple crypto function to work in c#? Pin
stephen.darling9-Aug-11 14:14
stephen.darling9-Aug-11 14:14 
AnswerRe: Getting this simple crypto function to work in c#? [modified] Pin
MicroVirus10-Aug-11 2:48
MicroVirus10-Aug-11 2:48 
GeneralRe: Getting this simple crypto function to work in c#? Pin
stephen.darling10-Aug-11 3:57
stephen.darling10-Aug-11 3:57 
GeneralRe: Getting this simple crypto function to work in c#? Pin
BobJanova10-Aug-11 4:00
BobJanova10-Aug-11 4:00 
GeneralRe: Getting this simple crypto function to work in c#? Pin
stephen.darling10-Aug-11 4:08
stephen.darling10-Aug-11 4:08 
GeneralRe: Getting this simple crypto function to work in c#? Pin
MicroVirus10-Aug-11 4:27
MicroVirus10-Aug-11 4:27 
AnswerRe: Getting this simple crypto function to work in c#? Pin
OriginalGriff9-Aug-11 21:39
mveOriginalGriff9-Aug-11 21:39 
GeneralRe: Getting this simple crypto function to work in c#? Pin
stephen.darling10-Aug-11 4:04
stephen.darling10-Aug-11 4:04 
Hi OriginalGriff,


OriginalGriff wrote:
Be aware that SHA is not an encryption algorithm. It is a hashing algorithm.


Yes; I am fully aware of this.


OriginalGriff wrote:
If you try to use SHA as a base component for your data encryption, there is very little chance that you will ever be able to decrypt your data back to the original input.


It is used in combination with basic 4 round Feistel cypher. It is pretty standard and employed in a number of situations where we want to "secure" a small amount of data. In fact, the formula for it is:

Left = Right ^ First - 8 (SHA-1 (Left + Key))
Right = Left



OriginalGriff wrote:
There are good reasons why encrypted data is generally longer that the input


Yes; under normal circumstances I fully agree.


OriginalGriff wrote:
If you need the size of you encrypted data to be the same as your input, then you will heavily compromise the security of that data


Also agreed! However, my application must accept a small key with a fixed number of bytes, which will be decoded into a fixed length data block to be used.

However, it must not be given to the end user as plain text, so this method is chosen.

I am fully aware, however, that the level of security is way lower, however, I am not bothered about anyone who has a bit time and knowledge to sit and de-cypher it.

I simply need a basic employment to deter casual tampering!

Thank you,
Stephen
GeneralRe: Getting this simple crypto function to work in c#? Pin
OriginalGriff10-Aug-11 4:21
mveOriginalGriff10-Aug-11 4:21 
AnswerRe: Getting this simple crypto function to work in c#? Pin
BobJanova9-Aug-11 23:18
BobJanova9-Aug-11 23:18 
GeneralRe: Getting this simple crypto function to work in c#? Pin
stephen.darling10-Aug-11 4:19
stephen.darling10-Aug-11 4:19 
GeneralRe: Getting this simple crypto function to work in c#? Pin
BobJanova10-Aug-11 8:22
BobJanova10-Aug-11 8:22 
GeneralRe: Getting this simple crypto function to work in c#? Pin
stephen.darling11-Aug-11 4:25
stephen.darling11-Aug-11 4:25 
QuestionGet div values Pin
Herboren9-Aug-11 9:40
Herboren9-Aug-11 9:40 
AnswerRe: Get div values Pin
BobJanova9-Aug-11 23:05
BobJanova9-Aug-11 23:05 
QuestionResetting a user control using the same instance Pin
MAW309-Aug-11 9:27
MAW309-Aug-11 9:27 
AnswerRe: Resetting a user control using the same instance Pin
BillWoodruff9-Aug-11 9:58
professionalBillWoodruff9-Aug-11 9:58 
GeneralRe: Resetting a user control using the same instance Pin
MAW309-Aug-11 10:35
MAW309-Aug-11 10:35 
AnswerRe: Resetting a user control using the same instance Pin
MicroVirus9-Aug-11 12:37
MicroVirus9-Aug-11 12:37 
GeneralRe: Resetting a user control using the same instance Pin
MAW309-Aug-11 13:13
MAW309-Aug-11 13:13 
GeneralRe: Resetting a user control using the same instance Pin
BillWoodruff9-Aug-11 14:54
professionalBillWoodruff9-Aug-11 14:54 
GeneralRe: Resetting a user control using the same instance Pin
MicroVirus10-Aug-11 3:15
MicroVirus10-Aug-11 3:15 
QuestionVisio Interop and C# Pin
USAFHokie809-Aug-11 7:53
USAFHokie809-Aug-11 7:53 
QuestionAdvice on building charts C#, ASP, etc. Pin
MAW309-Aug-11 7:31
MAW309-Aug-11 7:31 
AnswerRe: Advice on building charts C#, ASP, etc. Pin
Abhinav S9-Aug-11 7:39
Abhinav S9-Aug-11 7:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.