메소드 | 설명 | |
---|---|---|
Task ( List |
메소드 | 설명 | |
---|---|---|
AddCacheBreaker ( |
||
CacheBreakBlock ( |
||
CacheBreakProperty ( |
||
CacheBreakValue ( |
||
Encode ( byte arr ) : string | ||
GenerateCacheBreaker ( string path ) : string | ||
GetRandom ( int n ) : byte[] | ||
HashAndTruncate ( Stream input, |
OK, this is going overboard but you got to have some fun sometime. Truncating a hash isn't a safe operation, while an ideal hash would have equal entropy in each "half" there's no proof that any extant hash algorithm behaves that way. A construction proposed by Kelsey in 2005 is: - pick a fixed IV for length N * every potentional length has a different IV * we're going to truncate to 8 bytes always, so there's only one IV but in principle... - let H(IV ^ 0xCCC...CCC, N) be IV_H - let H(IV_H, message) be HASH - truncate HASH to N bits This is not (to my knowledge) a battle tested construction, but since we're only using it for cache breaking there's not much attack surface. It's also almost certainly better than anything I can cook up or naive truncation.
|