8 ms·
> Request signature format(crc): [time_stamp]_[md5(time_stamp+secret_key)] This should probably be an HMAC construction at the very least, and MD5 in general j
by beefhash 7y ago
> Request signature format(crc): [time_stamp]_[md5(time_stamp+secret_key)]
This should probably be an HMAC construction at the very least, and MD5 in general just should be discarded entirely in favor of BLAKE2b, SHA-2 or SHA-3. And ideally, it'd actually validate the rest of the contents as well.
- teko_ji 7y agoI think the author has made it as simple as possible for users and developers with basic skills.
- beefhash 7y agoWhile I agree with the notion of making things simple, security theater is worse than no security at all because it makes you feel safe when you may not be.
- teko_ji 7y agoMaybe so.)
- enedil 7y agoQuick and honest question: are you the author? You respond to lots of comments in the name of author, that's a rather surprising level of care about a niche piece of software.
- shujito 7y agoIs that a good or a bad thing to do?
- hk__2 7y ago> Is that a good or a bad thing to do? Posting comments in favor of a service without disclosing your’re its author is usually seen as a conflict of interest and, as such, a bad thing.
- Supermancho 7y ago> Posting comments in favor of a service without disclosing your’re its author is usually seen as a conflict of interest Not sure why, since it isn't in any practical or philosophical sense. I judge the merits of a post by the content. I don't know if you're Celebrity X or Author of Y and I don't care much. Yes it would be useful to reference other statements, but that's something you often sacrifice in an open (even moderated) online forum. It's a strength of the platform as well.
- kam 7y agoAlso the example PHP code doesn't validate the age of the passed timestamp so you could just replay a "signature" indefinitely... Given that, you might as well just use an unchanging token or Basic Auth. Assuming https, that wouldn't be terrible for this kind of use case. But put it in an Authorization header, not in a query parameter, so it doesn't end up in logs.
- grenoire 7y agoWell, the app has to support it, so you're down to the will of the developer. Sounds like a cool little thing, but wouldn't mind a standard to use on non-mobile platforms.
- re_dmitriy 7y agoThe documentation says it's a test of your choice.
- enedil 7y agoThere's another problem, if the author tells us that this is crc, while it's a MAC (not particularly strong tbh), it shows that we, as developers and users, cannot trust that cryptographic decisions of the author are of any consideration. For reference, crc is not a signature, its full name is "cyclic redundancy check", which is a really simple mathematical operation, that computes a specific remainder that comes from polynomial long division (of polynomials decided from the message). It is not any kind of cryptographic signature and given a string, it's crc and target crc, we can find another string that differs in one byte only, that has the target crc, all of this in time faster than computing whole original crc.
- ozzmotik 7y ago>we can find another string that differs in one byte only, that has the target crc reading that has me curious; if one can do that for any arbitrary string, and then iterate that process, doesn't that stand to reason that with enough work, one could make any two given strings calculate out to the same crc? I guess maybe not because that one byte constraint isn't specified as far as where it occurs and whether it's an insertion, deletion, permutation etc, but the way I see it if you can do it with one string to another, you could likely keep chaining that indefinitely and get countless strings that come to the same crc. sorry if this is old news or anything I was just struck by that thought while reading your comment
- deleted 7y ago[deleted]
- enedil 7y agoIt can be done with any byte. In CRC, you encode your input to a polynomial somehow, take an agreed-upon polynomial (dependent on the type of CRC, not the input data) - call it P. Compute the remainder of the input when divided by P, encode it, and that's CRC. So to get any desired CRC, you just need to solve a linear equation (in quite a lot variables, but it doesn't really matter). All in all, it's really easy.
- cryptonector 7y ago
- Lord_Zero 7y agoWhere did you find that?