# Tag Info

0

(Fellow embedded systems engineer here, I feel your pain regarding resource constraints.) Seems like this is exactly what Diffie Hellman key agreement is used for, which allows 2 parties to agree on a key while exhanging information in the clear. The big problem with "schoolbook" D-H key agreement is a man in the middle attack, so you want to authenticate ...

0

As already answered there are mathematical reasons why public-key (aysmmetric) algorithms must have strength less than their key size, often dramatically so: RSA or (non-EC) DSA/DH requires about 3000 bits size for 128 bit strength. For secret-key (symmetric) algorithms we can have strength equal to the key size, or colloquially "use all the bits", and ...

1

Does your embedded device have access to a random input source and a bidirectional channel? If not, then there will only ever be as much entropy on the chip as you put on it to begin with, so there's no purpose in updating the key. If so, then just do an authenticated key exchange and generate a new shared symmetric key occasionally. ECC is best for ...

0

When authenticity is provided, we can also provide confidentiality by using asymmetric cryptography. (Authenticity is needed for preventing MITM.) However, this seems to be rather cumbersome design with many round trips.

-1

Yes, your analysis is right. Don't know why Maarten Bodewes - owlstead says something else. This doesn't mean that your scheme is secure or the best idea. Every plaintext block will be encrypted with a new, pseudo random key. If the bit generation of the stream cipher is secure then there's no known way to get the original password without brute forcing it. ...

3

Under your scheme, the keystream generated by the stream cipher will be the same for each message enciphered with the same key. While your scheme does not encrypt identical blocks of plaintext in the same message to the same value, it does encrypt identical blocks of plaintext in different messages to the same value, meaning that XORing two ciphertexts ...

0

Tylo is correct that the keyspace size is not necessarily dictated by the number of bits in the key for an asymmetric algorithm. RSA is a prime example (pun intended). However, the problem is more fundamental: the best-known algorithm for breaking symmetric cryptography is usually brute-force, or at least, something with a negligible speedup over it; for ...

1

Usually we only consider those keys, we can actually use. There is no restriction about the bits in a symmetric key, you can use all of them. For asymmetric encryption schemes, both keys need to fulfill some constraints to actually work. For example: In RSA, $e$ has to be chosen coprime to $\phi(n)$, and you need $ed=1$ mod $\phi(n)$0. What does it mean? ...

0

A symmetric key is basically a random blob, the whole 2^n space is valid and thus has to be searched.

0

No, that's not possible because of the reasons given in the other answer. Unless the block size is linked with the key size, or if the cipher is not cryptographically secure, you should not be able to find out the key size by just looking at the ciphertext. This is true even if you know the algorithm. Note that this does not take side channel attacks into ...

1

You say are asking as a learning exercise, to learn how to invent ciphers. The way to learn that is not to try to invent some block cipher and then ask others to break it. The way to learn is to learn cryptanalysis, by breaking other ciphers. See Schneier's self-study course on cryptanalysis for one good resource.

3

When seeing clearly through all the cube "magic", one recognizes the following: All the cube operations are just key-dependent bit permutations. Therefore, the whole cipher is a sequence of key-dependent permutations and XORs with key bits. This admits an algebraic description: For all keys, there is a permutation matrix $A\in\mathbb F_2^{512\times512}$ and ...

2

Your scheme is indeed an instance of output feedback mode (OFB), using $$(\mathit{key},\mathit{pad}) \mapsto H(\mathit{key}\oplus\mathit{pad})\text,$$ where $\mathit{key}$ corresponds to keyhash and $\mathit{pad}$ to hash, as the "block cipher". (It is very likely not really a block cipher due to lack of bijectivity, but that's not needed for output feedback ...

0

You are creating a bitstream and XORing it with your plaintext so yes, it is. More precisely, it's a block cipher. Have a look at a previous discussion.

Top 50 recent answers are included