HP Forums

Full Version: ROT13 for HP41CX
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

OK, who has the best ROT13 prgm on your
HP41CX ?

Hi;

forgive-me for asking a silly question... What would be this program for? I really do not know what ROT13 stands for. Is it related to root-finder for polynomials?

Thanks.

An HP48/49 version: ROT13 for HP48/49.

Good scrambling all those less often used id's and passwords. But the program above
does not scramble numbers. A HP41CX version with number scrambling would be great
to have.

Luiz:

ROT13 is an old encryption algorithm. It's called ROT13 because all the letters are rotated 13 positions for encrypting, and another 13 for decrypting.

For example, "LUIZ" becomes "YHVM" because L is the 12th letter of the alphabet, 12+13 = 25, and the 25th letter is Y; U is the 21st letter, 21+13=34, 34-26=8, and the 8th letter is H; etc.

ROT13 was designed with a 26-letter alphabet in mind -- the alphabet used in the English language. Before using ROT13 you must ensure that there are no extraneous letters such as Ç or Ñ.

-Ernie

oevna:

The central idea in ROT13 is that the text should be encrypted OR decrypted by using the same algorithm, i.e., adding 13. In order to do the same with numbers, you'd have to use ROT5. In any case, ROT13 is a very weak encryption algorithm, too easy to break.

A few years ago I developed a variation of ROT13 which worked by inverting the status of all 8 bits in each character, so that an x'00' became an x'FF'. It mystified those that took a casual look at an encrypted file, simply because it looks like binary data, or hexadecimal gibberish.

The main subroutine's code follows. It's written in RPG IV (for IBM AS/400). I'd love to translate it to HP-41 lingo, but I haven't investigated the matter.

     C     invert        BEGSR

     C                   FOR       i = 1 TO 1600
     C                   EVAL      char = %SUBST($$text:i:1)
     C                   TESTB     '0'           char                     10
     C                   TESTB     '1'           char                     11
     C                   TESTB     '2'           char                     12
     C                   TESTB     '3'           char                     13
     C                   TESTB     '4'           char                     14
     C                   TESTB     '5'           char                     15
     C                   TESTB     '6'           char                     16
     C                   TESTB     '7'           char                     17
     C                   EVAL      char = X'FF'
     C   10              BITOFF    '0'           char
     C   11              BITOFF    '1'           char
     C   12              BITOFF    '2'           char
     C   13              BITOFF    '3'           char
     C   14              BITOFF    '4'           char
     C   15              BITOFF    '5'           char
     C   16              BITOFF    '6'           char
     C   17              BITOFF    '7'           char
     C                   EVAL      %SUBST($$text:i:1) = char
     C                   ENDFOR

     C                   ENDSR

-Ernie

HI;

thank you, Ernie. Also, thank you, oevna (is that your name or you encrypted it with ROT13, BRIAN?). Taht's interesting, and I think that a bit of ALENG, ATOX and XTOA will lead to a good HP41 version of ROT13.

Cheers.

Hello, Brian (oevna?)

Try this:

LBL 01
RDN
ENTER^
GTO 02
LBL "ROT13"
ALENG
LBL 00
ATOX
64
X>Y?
GTO 01
CLX
91
X<Y?
GTO 01
CLX
13
+
91
X>Y?
GTO 02
CLX
26
-
ENTER^
LBL 02
RDN
XTOA
RDN
DSE X
GTO 00
AVIEW
END
That's the third time I write this post, so I'll be brief. Any ALPHA string will be converted, simply type it in and run ROT13. Characters out of the A...Z range will be kept unchanged. I firstly wrote a complete post and lost it, sorry (it's 4:37 AM and I am almost sleeping as I write... Sorry).

I tried the site you mentioned, but my version of AcrobatReader (5) installed without any plugin and I could neither read it nor download it. The site is library.hp41, org type, subdir files, PPC, PPCmanual, and the file name is p084.pdf. I tried posting the complete name, but the museum's site did not allow me to.

Would you send me the p084.pdf file so I can read it? Do I deserve it? I decoded the address (using mine ROT13), didn't I?

Cheers!

Hi, oevna;

I tried to reply your e-mail but I got a User Unknown error. I thought you ROT13'ed your e-address, but I used the sender's address as reply. Should I use ROT13 on it? Or, if you believe there is a system error, would you e-mail me again, please? I received yours and I could download all data without problems. I'd just like to understand why the reply did not work.

Thank you.