2

When referring to a password that is to be stored somewhere, what is the correct way: Store the password in plaintext OR Store the password as plaintext?

Google searching different variations of this phrase, gives the in variant an almost consistent 10:1 ratio.

On the other hand, grammatically, using as seems (to me) more correct.

My theory is that the as variant is the correct way, but the in variant is used more commonly with an implicit form that comes after plaintext

e.g. Store the password in plaintext (form)

2
  • They're both OK. The words can also be separated, plain text.
    – TimR
    Commented Dec 9, 2015 at 21:07
  • In this context, plain text is not really the same as plaintext.
    – ahron
    Commented Jan 17, 2023 at 8:12

1 Answer 1

2

In the field of cryptography, which relevant to your context of passwords, plaintext (noun) is a technical term referring to the message that has not been encrypted. It is contrasted with ciphertext, which refers to the encrypted message. The separated form plain text is somewhat different and does not relate specifically to cryptography, so will be ignored in this answer.

Both forms in/as plaintext are grammatical, but mean different things. Storing the password as plaintext means that the password is stored without encryption. Storing the password in plaintext can have the same meaning, but it can also be read as an attempt at steganography, or hiding things in plain sight (for example, by inserting the password as an extra word in a given sentence).

With the addition of the word form, the word in now applies to form rather than plaintext, so in plaintext form carries the same meaning as as plaintext, as you suggest.

You asked in comments about a 10:1 ratio in favour of in plaintext. Since in plaintext includes and goes beyond the semantic range of as plaintext, this is perhaps not as surprising as it might first seem. Also, stored in plaintext parallels common phrases such as stored in lists (or other data structures) and stored in the cookie jar, and in plaintext sounds identical to the separated form in plain text, which parallels the common expression in plain sight. All these are plausible reasons for authors to think of the in form when writing. We're now crossing heavily into psychology, so I'll leave it at that.

TL;DR In answer to your question, as plaintext expresses your intent better than in plaintext.

3
  • Thanks. What would explain the 10:1 ratio I've noticed? In all the cases I checked, the word form did not appear after and I assume most do not actually relate to "embedding" the password in the plaintext
    – dankilman
    Commented Dec 10, 2015 at 7:33
  • @dankilman You're welcome. I've added a paragraph to my answer regarding your follow-up question about the 10:1 ratio, but I don't have anything definitive to say on that point.
    – Lawrence
    Commented Dec 10, 2015 at 8:56
  • 1
    Nice of you to consider steganography to make a distinction between in and as.
    – ahron
    Commented Jan 17, 2023 at 8:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .