hashing

Which is faster: a "radix tree" or a "b-tree"

For processing language, as in regular dictionary words, which would be faster at reading, a radix tree, or a regular b-tree? Is there a faster method, such as a dictionary with buckets & hashing? ...

Do i really need to hash passwords?

I am building a project, which has a pretty basic login system. There will NO REGISTRATION system available, the users will be added manually. Also i protected the databases data input gates very well. So after all, do i still need to hash and even salt the users passwords? And if your answer is yes, the next question is why? ...

Why do salts make dictionary attacks 'impossible'?

Possible Duplicate: Need some help understanding password salt Update: Please note I am not asking what a salt is, what a rainbow table is, what a dictionary attack is, or what the purpose of a salt is. I am querying: If you know the users salt and hash, isn't it quite easy to calculate their password? I understand the proces...

Hashing function with partially-reversable part

Hello again. Is there any known hashing algorithm, which for similar input returns similar output? I need it for creating 'tickets' without checking them against DB. My idea is that I create token carrying (userID and timestamp) (not reversable), and pass this token along with userID, and be able to check, if the token has given UserID,...

Is this kind of hashed verification safe?

Dear SO-ers! The question I'm about to ask is just because I'm curious. I think I'm doing the right thing, but I want to make sure it actually is the right thing. It's about hashing. The website I am currently building features several Ajax-ed components. First of all, users that are not logged in cannot use these components. Second, u...

Encode password to MD5 using keys

At the moment I do this: public static class Crypto { public static string Encode(string original) { var md5 = new MD5CryptoServiceProvider(); var originalBytes = Encoding.Default.GetBytes(original); var encodedBytes = md5.ComputeHash(originalBytes); return BitConv...

Picking five numbers that sum to S

Given an array A of N nonnegative numbers, I'm interested in finding the number of ways you can pick 5 numbers (from distinct positions in the array) such that their sum is S. There is an easy solution in O(N^3): Let H be a hash table of (sum, position of leftmost element of sum) for i = 0, N for j = i + 1, N H.add(A[i] + A...

Mac hash function broken

I'm more or less attempting to determine crypography algoirthms and how they work. I'm a little confused on proving how one is trivial. For example: MAC(xbit_key,Message) = xbit_hash(Message) XOR xbit_key ...

Simple string hashing function

I'm trying to hash a string into an integer for placing it in an array. However I do not know all too much about hashing functions, and that's why my current method is just adding all the ASCII numbers of the characters together and taking it mod the array size. Are there any simple faster/better methods? ...

How to separate a person's identity from his personal data?

I'm writing an app which main purpose is to keep list of users purchases. I would like to ensure that even I as a developer (or anyone with full access to the database) could not figure out how much money a particular person has spent or what he has bought. I initially came up with the following scheme: --------------+-----------...

Confusion about linear probe method based Open Addressing in hashtables?

Suppose array index according to hashing function for string "temp" is 155 and location 155 is pre-occupied then location 156 is tried. Suppose location 156 is available, so this entry is saved in location 156 instead of 155. Later I find another string "another_temp", which maps to location 156. Again this is saved in next available loc...

Why is a SHA-1 Hash 40 characters long if it is only 160 bit ?

The title of the question says it all. I have been researching SHA-1 and most places I see it being 40 Hex Characters long which to me is 640bit. Could it not be represented just as well with only 10 hex characters 160bit = 20byte. And one hex character can represent 2 byte right? Why is it twice as long as it needs to be? What am I miss...

About password hashing system on client side (javascript, silverlight and android)

Hi everybody, When I want to put in place a login system, I always compare the md5 of the given password with its value in the users table on the server side. However, a friend of mine told me that a "clear" password could be sniffed by a network software. So my question is : Is it a good idea to hash the password on the client side? ...

Do any security experts recommend bcrypt for password storage?

On the surface bcrypt, an 11 year old security algorithm designed for hashing passwords by Niels Provos and David Mazieres, which is based of initialization function used in the NIST approved blowfish algorithm seems almost to good to be true. It is not vulnerable to rainbow tables (since creating them is too expensive) and not even vuln...

Detect changes in NSArray in ObjC

Hello, I need to detect change in NSArray object - that is if some object was added/removed to/from NSArray or was just edited in-place. Are there some integrated NSArray hash functions for this task - or I need to write my own hashing function for NSArray ? Maybe someone has different solution ? Any ideas ? Thanks. ...

traverse down through a radtreeview

I need to traverse down my radtreeview programmatically. All I have to start with is the root of the tree. I also have to check first if children nodes exist or not. I have done this before in windwos forms but now I have to deal with it in WPF, Telerik RadTreeView control and .NET 4.0. What is the best way to do this? How to I even get ...

Linux command line SHA-256 hash different from online tools?

I was looking for a quick way to compute the SHA-256 hash of a password so I could upload some test data into a database that we are using Spring Security to authenticate against. First I found the linux utility sha256sum and ran it again the password "admin" and got this result: fc8252c8dc55839967c58b9ad755a59b61b67c13227ddae4bd3f78a3...

C++ performance issue

Hi all, I am having a little dilemma with a C++ code. Its actually a performance issue. I am trying to traverse through two hash_maps which is causing a lot of slowness. Heres the hash map class code. Let me know if I am missing something from this. template<class Handle, class Object, class HashFunc, vector<Object *> (*initFunc)()> ...

Multiple Password Hash

I'm currently working on a Web app that requires a high level of security and I've been thinking about the password handling. That I should use a hashed password, with a large enough salt is a given, but would it be a benefit to hash the password multiple times with different salts or different algorithms? I'm not referring to the fact ...

What hashing algorithm should I use?

The PHP function hash_algos() gives me this list on my webserver: [0] => md2 [1] => md4 [2] => md5 [3] => sha1 [4] => sha256 [5] => sha384 [6] => sha512 [7] => ripemd128 [8] => ripemd160 [9] => ripemd256 [10] => ripemd320 [11] => whirlpool [12] => tiger128,3 [13] => tiger160,3 [14] => tiger192,3 [15] => tiger128,4 [16] => tiger160,4 [17...