Hot answers tagged

7

No, you can't; the reason you can't depends on the negotiated TLS ciphersuite: The original ciphersuites had the server send to the client the server's RSA public key; the client selects a random value ("premaster secret"), and encrypts that value with the server's public key; it sends that encrypted value to the server. Now, these public keys have the ...


2

I'm not sure, but I guess that two different openssl version or just builds could be done with or without support of Elliptic Curves with unsecure security levels. Furthermore your curves have very low security level, and you shouldn't use them if security is a concern (and if it's not, you probably don't need ECDSA at all). However, your assumption that ...


2

Asn1parse to the rescue. Most of the overhead is from the base64 encoding and the PEM header and footer. The raw size of the compressed form ASN1 encoding is just 44 bytes for my dummy key. And 22 of those bytes are for the 161 bits of the actual public key. $ openssl asn1parse -in compressed_public.pem -i -dump 0:d=0 hl=2 l= 42 cons: SEQUENCE ...


1

Or does OpenSSL derive the IV by the decryption key somehow from the packet ? Well, yes. Actually, it's not that complicated; for DTLS and AES-CBC mode, the IV is the first 16 bytes of the encrypted region, so it just reads it from there, and starts decrypting from there. In DTLS, we assume that encrypted packets can be dropped in flight (or received ...


1

It depends on what algorithm (determined by key type) and padding you use. If the key is a DSA key, or an ECC key used for ECDSA, those algorithms normally use randomized signatures to remain secure, and OpenSSL does so. (There is a variant scheme that makes k unique and unpredictable without making it truly random, but it is not widely used and not ...


1

Basically you would be constructing an AEAD scheme. You will need to perform HMAC over the IV, the ciphertext and possibly over additional associated data (AAD). If you just need to authenticate the ciphertext then you may simply leave out (or leave empty) the AAD - but not the IV during the HMAC function. Fortunately somebody already thought about ...


1

It's trivial to code your own wrapper function if you really want to use such API. Here is a Python-inspired pseudo code: def mywrapper(data, offset, encspecs): subdata = data[0:offset] ciphertext = whatever_enc_function(subdata, encspecs) return ciphertext encspecs = ... plaintext = "...etc" ciphertxt = mywrapper(plaintext, offset, encspecs) ...


1

That wikipedia article is about TLS, and lists separately only EC curves that have assigned numbers in TLS; for TLS all other curves fall under "arbitrary prime" or "arbitrary 2^m". OpenSSL supports for non-TLS operations including ECDSA quite a few curves not numbered for use in TLS, including the three you list. As requested, I do not comment on their ...



Only top voted, non community-wiki answers of a minimum length are eligible