Score:1

Does the bit generated password using QKD protocols need to be converted to another base?

es flag

I am currently implementing some QKD protocols using Qiskit and I came up with the following question: After the protocol is finished, a true random password is generated using 0s and 1s, however, and here my question, do these passwords need to be converted to another base? Maybe hexadecimal? Or are they used as they are?

When I mean by used is to using them, for instance, as a key for the one time pad.

Paul Uszak avatar
cn flag
Err, what do you mean by _"When I mean by used is to using them, for instance, as a key for the one time pad?"_ Password $\ne$ cryptographic key. Are you simply thinking of generating OTP material and are using the term 'key' loosely? A lot of people use the term one time pad interchangeably with stream ciphers and pseudo randomness.
Paul Uszak avatar
cn flag
Qiskit is software. What's the hardware?
Rafa avatar
es flag
Sorry for the late reply. The hardware is the IBM quantum computers. This is not a real product, I am writing my thesis and I just implement them for educational purposes. Regarding the other question, to my understanding, the QKD serves as a mean to distribute a key securely, or as you said "cryptographic key". Meaning that once you obtain that key, you can use it to encrypt and decrypt information, for instance using the one time pad as cypher method. Your are in fact correct, I should have said key and not password.
Rafa avatar
es flag
My question is, once you obtain the key, in the industry, do they convert it to other bases, or do they just use it as it is (with only 1s and 0s)
Score:1
ng flag

Do the bits generated password using QKD protocols need to be converted to another base before being used as a key for the one time pad?

No, if the OTP encrypts symbols that are bits, as does the most usual OTP.

Yes, in all the other cases. One simple method is rejection sampling: if symbols can take $n$ values, we group input QKD bits by blocks of $b=\left\lceil\,\log_2 n\right\rceil$, convert a block to integer $i$ with $0\le i<2^b$ per e.g. big-endian convention, reject the block if $i\ge n$ (note: which won't happen when $n$ is a power of two), and otherwise use $i$. Among several ways, the OTP can proceed by adding $i$ modulo $n$ for encryption, and subtracting $i$ modulo $n$ for decryption.

But that's arguably the easiest part in QKD. For the difficult ones, see this.

Maarten Bodewes avatar
in flag
"No, if the OTP encrypts symbols that are bits, as does the most usual OTP." or symmetric cipher...
Score:1
cn flag

As you know, most computers talk in binary " (with only 1s and 0s)". So $E_K(P) = C$ in any base as long as encryption function $E$ is a bijection. Therefore $E'_{K}(C) = P$ reveals the original message. As long as $E$ is deterministic and bijective, the numeric base is kinda irrelevant, but computers do love their octets. [This is not the quantum notation down the fibre optic.]

For example, the following is a cardboard base encoding (and probably before XOR/ASCII was invented):-

Pad

59 1 62 62 64. Does this help:-

enter image description here

Notice that (whist preferable) a true one time pad is not required. Conventional symmetrical encryption can be used with regularly changed keys that come through the fibre. So that $|K| \ne |P|$. This greatly helped with throughput but QKDNs are getting pretty fast nowadays.


Is there any chance that you're conflating polarization bases with numeric bases?

fgrieu avatar
ng flag
Comment on the cardboard shown: that "TAPIR" table was used to convert text into decimal digits and back, with approximately uniform distribution. It's an auxiliary to an encryption convention using a base-10 OTP, see [this](http://users.telenet.be/d.rijmenants/en/onetimepad.htm). This OTP is one that would need the base conversion asked in the question.
Paul Uszak avatar
cn flag
@fgrieu I'm really struggling with TAPIR. How do we encrypt "A" modulo 10 and differentiate between "A" and "0"? Unless we do modulo 100, isn't the cipher leaking information as some letters are encoded to single numerals? That then facilitates frequency analysis (assuming AEINR are Russian vowels). Should this be new question?
fgrieu avatar
ng flag
Apparently, sequence of digits are introduced by a 82 and ended with 81. Looks suboptimal. But I'm not an authority in this. Perhaps it would make a nice Q.
Score:0
cn flag

At this step, you can use your key to generate a one-time-pad key with a cryptographic pseudo-random-generator. This functionality takes a fixed-length key as input and output as many bits as you need (if you use it recursively):

https://crypto.stanford.edu/pbc/notes/crypto/prng.html

Then you would use this one-time-pad key by xoring it with a plaintext message of same length. Then you can send classically the ciphertext computed.

Another possibility (more general) is also to use symmetric encryption with the secret key computed by the quantum protocol to encrypt the plaintext message :

https://en.wikipedia.org/wiki/Symmetric-key_algorithm

In any case, you have to be sure than the key length is enough big.

Paul Uszak avatar
cn flag
_A lot of people use the term one time pad interchangeably with stream ciphers and pseudo randomness._
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.