What is use of Initialization Vector in cipher? Initialization vector is being used in all the ciphers. What is the need of this initialization vector. Are we using standard initialization vector for each cipher or a user can define it.
23688
What are the main differences between a nonce, a key and an IV? Without any doubt the key should be kept secret. But what about the nonce and the IV? What's the main difference between them and their purposes? Is it only that, in literature and in practice, an IV is being used as "initiator" of a block cipher encryption mode which should be unique? And the same property should hold for a nonce as well, but since it doesn't instantiate something we call it a nonce? I.e: in AES-CTR mode the IV is a nonce+counter. And both are put in plaintext format in the beginning of the ciphertext.
77640
Earlier I asked a question about  and got the answer that while it is only necessary for anonymous types, that it is used nonetheless to make writing code 'quicker'/easier and 'just because'.  Following  I saw that var gets compiled down to the correct type in the IL (you will see it about midway down article).  My question is how much more, if any, IL code does using the var keyword take, and would it be even close to having a measurable level on the performance of the code if it was used everywhere?
59726
I have read a lot of summaries of block ciphers particularly with regards to the NIST competitions stating that reduced-round block ciphers are – for example – vulnerable to differential cryptanalysis.  I have a general idea that the application of differential cryptanalysis is to look at the difference between inputs;  makes that fairly clear. However, I could take any two inputs for any given block cipher and I am pretty certain I'd be staring at random differences.    I am aware this is the idea of a well written block cipher; however, assuming a broken or vulnerable cipher (feel free to provide simple examples) how do I go about choosing differences to try?  Are there any clues in algorithm design that would inform a decision on which values to choose?  How does being vulnerable to differential cryptanalysis impact a cipher in the wild?  If all I have are differences between known plain-texts and known keys as my analysis and a captured ciphertext as my data to exploit, what can I actually deduce?
49431
I have 40 different images (1, ..40),( each one has 10 repetition " 40x10"),i should use one hot encoding for each image (the 40),  for example image (1) the one hote encoding will be encoding will be: [ 1 0 0 0 0 0 0.....40(0)],  for images 2 the one hot encoding will be : [ 0 1 0 0 0 0 0 ...40(0)],  since each image has 10 repetition, for example; for the 10 images of 1 ( they are for same object but with slight difference among them),  should  I use same code vector for the 10 repetition!!
90954
Straightforward question, so if it is applied to every element of a vector that means that every one of them is scaled down exactly length times. How did people come up with this, to make it exactly 1? I am sorry if this is fairly obvious, but I just don't see it.
64613
I was wondering if anyone around here could give me some explanation on this type of attacks. Pretty much the only thing that I could find is .  What I really need is basic explanation of the attack itself with a small example if possible such as any basic block cipher that you could come up with with 3-4 rounds. This is for my personal understanding so any input is more than welcome.
94519
Is it possible in c# to initialize an array in, for example, subindex 1?  I'm working with Office interop, and every property is an object array that starts in 1 (I assume it was originally programed in VB.NET), and you cannot modify it, you have to set the entire array for it to accept the changes.  As a workaround I am cloning the original array, modifying that one, and setting it as a whole when I'm done.  But, I was wondering if it was possible to create a new non-zero based array
36521
I want to examine the contents of a std::vector in GDB, how do I do it?  Let's say it's a std::vector&lt;int&gt; for the sake of simplicity.
56951
I have been learning about Vigenere ciphers and then thought of this scenario: if a cryptographer encrypts a plaintext English message with a Vigenere cipher and then another cryptographer, who wants to ensure that the message is very secure, encrypts the ciphertext with another Vigenere cipher (with a different key length). Given only the ciphertext, how can you decrypt the message? A step by step explanation would be greatly appreciated.
110421
I am new to crypto and trying to understand if it would be insecure to use a cipher such as AES to encrypt a key with the same key. If it is insecure, then why would it be insecure?  Basically, something like this:  encrypt(key, key)   What happens when both key and message are the same (128 bits)?  The obvious question would be why would I want to do that. If I have a secure channel to send the key, why encrypt it? My question is more for understanding.
63578
I'm trying to understand the difference between the following and what they actually mean :   Known plaintext attack Known ciphertext attack Chosen ciphertext attack Chosen plaintext attack   Any clarification is much appreciated…
5014
I know this is a really basic question, but I've just started with some basic C++ programming after coding a few projects with high-level languages.   Basically I have three questions:   Why use pointers over normal variables? When and where should I use pointers? How do you use pointers with arrays?
8383
Again me with vectors. I hope I'm not too annoying. I have a struct like this :  struct monster  {     DWORD id;     int x;     int y;     int distance;     int HP; };   So I created a vector :  std::vector&lt;monster&gt; monsters;   But now I don't know how to search through the vector. I want to find an ID of the monster inside the vector.   DWORD monster = 0xFFFAAA; it = std::find(bot.monsters.begin(), bot.monsters.end(), currentMonster);   But obviously it doesn't work. I want to iterate only through the .id element of the struct, and I don't know how to do that. Help is greatly appreciated. Thanks !
53471
Now that it's clear , there is an associated concept that I use all the time without knowing what it really means.   I suppose everybody made once a mistake with parenthesis, resulting  in an "object is not callable" exception. What's more, using __init__ and __new__ lead to wonder what this bloody __call__ can be used for.  Could you give me some explanations, including examples with the magic method ?
28259
In this article , specifically in the section 4.1 of the initialization phase,the following cryptographic hash functions have been chosen: \begin{align} h_1&amp;:   \mathbb G\to\mathbb Z_q^*\\ h_2&amp;:  \{0,1\}^*\times\{0,1\}^*\times\mathbb G\to\mathbb Z_q^*\\ h_3&amp;:  \{0,1\}^*\to\mathbb Z_q^* \end{align} where G is an additive group with order q. Can anyone explain to me what's the meaning of their notations and how to use them for example in SHA algortihm? Or maybe give me a simple example with real inputs?
35935
I'm using the 'using' declaration in C++ to add std::string and std::vector to the local namespace (to save typing unnecessary 'std::'s).  using std::string; using std::vector;  class Foo { /*...*/ };   What is the scope on this declaration?  If I do this in a header, will it inject these 'using' declarations into every cpp file that includes the header?
13112
What does the register keyword do in C language?  I have read that it is used for optimizing but is not clearly defined in any standard.  Is it still relevant and if so, when would you use it?