278 reputation
216
bio website google.com
location Stack Overflow
age 31
visits member for 2 years, 3 months
seen Mar 18 at 20:19

I post stuff on stackoverflow and want a free profile badge for filling out this section :D


Jan
6
comment what is it called when encrypt('a') + encrypt('a') == encrypt('aa')?
@Steve Sether - good point. Although technically in PHP string concatenation is done with the dot operator (.). I did + because it seems that that's more common for string concatenation than .. Java, Javascript and C++ all use + for string concatenation. But I think in this forum || would have made the most sense.
Jan
2
comment what is it called when encrypt('a') + encrypt('a') == encrypt('aa')?
@Nova - fair enough!
Jan
2
comment emulating progressive encryption with RC4 / OpenSSL
I'm trying to interface with a third party API that uses RC4? I'm trying to refactor some code that decrypts RC4 encrypted data from a DB with two billion records? Does it really matter? That RC4 isn't recommended doesn't change the fact that legacy applications sometimes still use it.
Jan
2
comment what is it called when encrypt('a') + encrypt('a') == encrypt('aa')?
@Nova - +, in this case, is representing the concatenation operation - not addition. Why would you assume it means addition when, as you said, that doesn't make any sense? That's like me saying "can I do this?" and then someone else saying that that sentence doesn't make sense because can is a noun. "a usually metal typically cylindrical receptacle usually with an open top". I mean, if you have two different definitions why would you assume it's the one that doesn't make sense?
Jan
2
comment what is it called when encrypt('a') + encrypt('a') == encrypt('aa')?
sandbox.onlinephpfunctions.com/code/… When I execute that code v1 and v2 are the same (ie. encrypt('a') + encrypt('a') == encrypt('aa')) but v3 isn't. I am not asking why. I know why. yyyyyyy's post elaborates as to the why. I am wanting to know if there is a name for this behavior. And as for using two different cipher suites... idk what you're talking about. They're both des-cbc. Take a second look at the first code snippet and you'll see mcrypt_module_open(MCRYPT_DES, '', MCRYPT_MODE_CBC, ''). MCRYPT_MODE_CBC means cbc - not ecb etc
Jan
2
comment what is it called when encrypt('a') + encrypt('a') == encrypt('aa')?
yyyyyyy seemed to understand the question just fine. You asked three questions so I'll answer them in order. For #2... no. I know how to do that. See the first of the two code samples I posted. For #3... see the second code snippet I posted. The output, in that example, does not change, even tho I'm encrypting the same thing twice. As I said in my OP this makes since given the API. I was just wanting to know how best to refer to the difference between the two code samples. Both code samples do CBC mode but only one of them gives different outputs for each "block".
Jan
2
comment emulating progressive encryption with RC4 / OpenSSL
See crypto.stackexchange.com/q/21143/4520
Jan
2
comment emulating progressive encryption with RC4 / OpenSSL
SSH uses it. I don't really know of any other term to describe it. The basic idea is... if you do encrypt('a') + encrypt('a') you get the same thing as encrypt('aa'). ie. if you're using CBC mode the IV doesn't get reset after you perform a round of encryption. Or if you're using a stream cipher the keystream doesn't get reset to what it was when it was created - it persists across multiple encrypt() calls.
Dec
31
comment What is the SSL private key file format?
@fgrieu - yah - 30h in binary is 0011 0000 which is universal class, constructed encoding, SEQUENCE (SEQUENCE, per luca.ntop.org/Teaching/Appunti/asn1.html, is 10h or 0001 0000; pretty much all SEQUENCEs are constructed). 02h being int is a little more straight forward.
Dec
31
comment What is the SSL private key file format?
So if all you have is p and q and you used a standard value for e (ie. 65537), you'd still need to calculate d and n. Typically private keys also include the CRT coefficieints as well. So once you have all that you could do something like pastebin.com/NW1CmYyc with phpseclib.
Dec
31
comment What is the SSL private key file format?
I've edited my orig post to provide more insight hopefully. I'll do another edit to explain how to use p and q.
Nov
30
comment transforming RC2 keys to have effective minimum length in implementations with fixed effective lengths
Ok. I will tell that to the company who's API my company is integrating with. I'm sure that will go absolutely no where, leaving me right back where I started. While I'm at it I think I'll go write a letter to Obama telling him that the individual mandate sucks and that single payer is better. I'm sure that'll go just as far.
Sep
20
comment PKCS1 and blind RSA signatures
@CodesInChaos - that jibes with my understanding. Although I'm not sure why a probabilistic padding scheme would be bad? I'm also unsure of why, when you already have a hash, blinding is necessary, since the hash pretty much obscures the message already. I guess I'll start a new question for that lol
Sep
18
comment PKCS1 and blind RSA signatures
Also, it seems to me that it necessarily needs to be broken up anyway. If you were going to sign the message wouldn't be a blind signature. It'd be a regular signature. So you pad the message, don't do RSA, blind it, and then send it off to the signer for them to sign it. But since they're signing a blinded message they wouldn't know what the original message was. Of course since you're sending a padded hash it seems to me that they wouldn't know what the orig message was anyway. Unless I'm totally misunderstanding blind signing.
Sep
18
comment PKCS1 and blind RSA signatures
You do EMSA-PKCS1-V1_5-ENCODE, blind and then do modular exponentiation. RSASSA-PKCS1-V1_5-SIGN is EMSA-PKCS1-V1_5-ENCODE and modular exponentiation. Blinding has to be done in the middle of those two, it seems to me, hence my saying you have to side-step RSASSA-PKCS1-V1_5-SIGN.
Sep
17
comment PKCS1 and blind RSA signatures
I'm not proposing unpadded rsa. I'm proposing doing EMSA-PKCS1-v1_5-ENCODE but not the full blown RSASSA-PKCS1-V1_5-SIGN
Dec
15
comment Creating a small number from a random octet string
I think you're right Thomas in that a typo was made. With (N / K) * K the K's would cancel each other out leaving you with N, which X is already pretty much guaranteed to be less than.
Dec
15
comment ANSI X9.31 standards for generating random numbers
Is there some reason DES in counter mode shouldn't instill confidence? I could lack confidence over RSA encryption with a 4096-bit key but I'd probably be silly to do so without a specific reason..
Dec
14
comment ANSI X9.31: the purpose of the date/time vector in the PRNG?
What if v* isn't a fixed secret? Plus, it seems to me that Ek() would need to have random keys / IVs anyway so if you could generate a random key / IV with what's available in your entropy pool why not just do the same for V*?