Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.programming > #12529

Re: string encryption

From Ben Bacarisse <ben.usenet@bsb.me.uk>
Newsgroups comp.programming
Subject Re: string encryption
Date 2021-04-29 22:33 +0100
Organization A noiseless patient Spider
Message-ID <87sg38ixmr.fsf@bsb.me.uk> (permalink)
References <1ba37dc7-803d-40ba-9e83-c4bd0b5f1394n@googlegroups.com> <s6cejg$p5h$1@gioia.aioe.org> <cfd6267e-93c3-4e8b-8d25-d7791dc8f6e7n@googlegroups.com> <s6did6$nmj$1@gioia.aioe.org> <s6dnpl$3je$2@dont-email.me>

Show all headers | View raw


David Brown <david.brown@hesbynett.no> writes:

> On 29/04/2021 08:06, Dmitry A. Kazakov wrote:
>> On 2021-04-28 23:33, Malcolm McLean wrote:
>>> On Wednesday, 28 April 2021 at 20:55:38 UTC+1, Dmitry A. Kazakov wrote:
>>>> On 2021-04-28 16:27, Malcolm McLean wrote:
>>>>> What's the best method for cheap and cheerful string encryption,
>>>>> which takes a plaintext string and a short string as a key, and
>>>>> returns a crypted string? The encrypted text must be a string, so
>>>>> the encryption must never create a nul character. It might also be
>>>>> best not to create ascii control characters, or non-ascii characters.
>>>> Looks like a symmetric encryption to me. Any method would do. E.g.
>>>> ChaCha20 cipher. Hash the key to initialize. There are plenty
>>>> implementations of. It is cryptographically strong, computationally
>>>> fast, needs no padding.
>>>>
>>> CHaCha20. Hadn't heard of that. That's the sort of idea I'm looking for.
>> 
>> https://www.cryptopp.com/wiki/ChaCha20
>> 
>>> I can't change our entire development language just to support a
>>> little encryption
>>> routine. It will be a problem to me if the encrypted data is not
>>> representable as
>>> a C string.
>> 
>> Well, even in C you can pass the length along instead of using NUL as a
>> terminator.
>> 
>> It is amazing how things like Base64 and uuencoding are still alive when
>> teletypes and modems for which they made sense are long dead. 
>
> We still have email attachments, which is the prime use of these
> encodings.  (I don't remember using them with modems, but maybe others did.)

Yes.  The "uu" in uuencode and uudecode comes from "Unix to Unix copy"
that was used to distribute email and netnews in the old days.  uucp was
used over modems, some of which needed 7-bit transfers.

-- 
Ben.

Back to comp.programming | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

string encryption Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2021-04-28 07:27 -0700
  Re: string encryption Kristjan Robam <he12457@hotmail.com> - 2021-04-28 08:39 -0700
  Re: string encryption David Brown <david.brown@hesbynett.no> - 2021-04-28 19:58 +0200
    Re: string encryption David Spencer <spencer@panix.com> - 2021-04-28 18:00 +0000
      Re: string encryption David Brown <david.brown@hesbynett.no> - 2021-04-28 20:47 +0200
      Re: string encryption Kristjan Robam <rob999999999@yahoo.com> - 2021-04-29 02:26 -0700
    Re: string encryption Kristjan Robam <ya12983@mail.com> - 2021-04-28 12:14 -0700
    Re: string encryption Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2021-04-28 14:33 -0700
    Re: string encryption Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2021-04-28 14:39 -0700
  Re: string encryption "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> - 2021-04-28 21:55 +0200
    Re: string encryption Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2021-04-28 14:33 -0700
      Re: string encryption "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> - 2021-04-29 08:06 +0200
        Re: string encryption David Brown <david.brown@hesbynett.no> - 2021-04-29 09:38 +0200
          Re: string encryption "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> - 2021-04-29 10:00 +0200
          Re: string encryption Ben Bacarisse <ben.usenet@bsb.me.uk> - 2021-04-29 22:33 +0100
      Re: string encryption David Brown <david.brown@hesbynett.no> - 2021-04-29 09:37 +0200
        Re: string encryption Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2021-04-29 06:40 -0700
          Re: string encryption David Brown <david.brown@hesbynett.no> - 2021-04-29 17:01 +0200

csiph-web