Warning: mysqli::__construct(): (HY000/1203): User howardkn already has more than 'max_user_connections' active connections in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\includes\artfuncs.php on line 21
Failed to connect to MySQL: (1203) User howardkn already has more than 'max_user_connections' active connections
Warning: mysqli::query(): Couldn't fetch mysqli in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\index.php on line 66
Article <v0lgs1$125o7$1@dont-email.me>
Deutsch   English   Français   Italiano  
<v0lgs1$125o7$1@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Herbert Kleebauer <klee@unibwm.de>
Newsgroups: sci.crypt
Subject: Re: base26 Encoder/Decoder
Date: Sun, 28 Apr 2024 14:53:19 +0200
Organization: A noiseless patient Spider
Lines: 67
Message-ID: <v0lgs1$125o7$1@dont-email.me>
References: <uoekm1$3rhsc$1@i2pn2.org> <g74JN.751237$mUo.609280@fx08.ams4>
 <v0dtc5$276id$1@i2pn2.org> <v0dup1$276id$2@i2pn2.org>
 <7P6XN.610386$oD2.194358@fx11.ams4> <v0j5oi$2ddq4$1@i2pn2.org>
 <oknXN.41708$XrN3.19814@fx01.ams4> <v0l0e2$2ff66$1@i2pn2.org>
 <v0l9lf$10knh$1@dont-email.me> <v0lc45$2ft6v$1@i2pn2.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 28 Apr 2024 14:53:21 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="869158275ee9a96dce983a1ad2f127e4";
	logging-data="1120007"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX193/z+EtLtAZD9dNvDS1nqlbJSy9NccQ0w="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:9eygK48Uv8XAalliepShiVZnYbA=
Content-Language: de-DE, en-US
In-Reply-To: <v0lc45$2ft6v$1@i2pn2.org>
Bytes: 3223

On 28.04.2024 13:32, Stefan Claas wrote:

> $ echo -n 'Hello sci.crypt! :-)' | base16
> 48656c6c6f207363692e637279707421203a2d29

> $ echo -n 'Hello sci.crypt! :-)' | base26 | ug -g
> GNUKB WRRLQ QCISN UJYEH SKYLR PJHKG YPTEA


I still don't understand it. In this example you have
a 20 byte String: Hello sci.crypt! :-)

The base16 (hex) conversion is trivial: you take a
single byte of the input string and replace it by
2 hex characters. No padding necessary, because the
chunk length is 1 byte and so the string length is
always a multiple of the chunk length.

But how does your base26 coding work. Take you four bytes
of the input string and then convert this 32 bit number
to base26 resulting in a 7 digit base26 number? There
are 5 of this 4 byte chunks which gives a total of 35
base26 digits. But how do you handle padding if the
input string length is not a multiple of 4?

Or do you treat the complete string as a single number
0x48656c6c6f207363692e637279707421203a2d29 and convert
this 160 bit number to a single base26 number? This would
also result in a 35 digit base26 number, but would
require long number arithmetic and consume a lot of
computing power (suppose the input string is 1 MByte or
even 1 GByte). In this case you don't have a problem
with padding but with leading zeroes.

But I still don't understand the advantage over base16.
If you only can use A-Z as transferable digits, you can
use an alternative to the standard hex encoding:

  0  A  or Q
  1  B  or R
  2  C  or S
  3  D  or T
  4  E  or U
  5  F  or V
  6  G  or W
  7  H  or X
  8  I  or Y
  9  J  or Z
10  K
11  L
12  M
13  N
14  O
15  P

Because there are two ways to encode 0-9, you
can use this to send a second data stream. If
A-J is used a 0 bit transferred and if Q-Z is used
a 1 bit is transferred on this second channel. You
can use this for example for a check sum or an
error correcting code.