u/External-Quarter2147

Punch cards for data storage in modern times

Punch cards for data storage in modern times

I saw a documentary about punch cards, and wanted to do some experiments with them today. I managed to get together a 128-bit card system that can be read using a Python script and a web camera, and the cards can also be made(3d cad models) using a Python script and then printed.

The cards also have a parity bit, so that the program knows if they were correctly read. 128-bit can be used for a key of some sort, or perhaps a password.

Punch cards are hard to hack, and if made from stainless steel, they will last for thousands of years if kept reasonably safe. They will also be fire safe!

One time cards would also be a possibility, perhaps made from dissolving salt or chocolate?

Just thought i would share this project if someone finds it interesting.

https://preview.redd.it/rhy5yv7zub0h1.png?width=669&format=png&auto=webp&s=be84fb11adbb60a1cf032f01a9862066dab1b6ad

https://preview.redd.it/z4k772szub0h1.png?width=1280&format=png&auto=webp&s=8128ba00c37cd4422196e2990cd1ea5c8c270864

https://preview.redd.it/sfkfsll0vb0h1.png?width=491&format=png&auto=webp&s=51854aca6828ace041ffdeaec8b1b1510a4eca7e

reddit.com
u/External-Quarter2147 — 4 days ago

Beginner trying to determine diskspeed

I'm a beginner, and have played 43 rounds of discgolf since last summer. I had big issues with my throws then, but for some reason they work a lot better now, after doing nothing this winter. I now get throws about 200 feet regularly, with decent precision.

To try to figure out how fast and with what spin i throw discs i tested to film with a camera at 60fps, and did some calculations, i get that i have a diskspeed of 40 mph and about 900 rpm. Its not the best method surely, but its completely free if you have a mobile camera.

Has anyone else tested this method with sucsess?

https://preview.redd.it/fct7sitkqb0h1.png?width=1044&format=png&auto=webp&s=007052ec9799ada7cca0297be9e193bbcea59333

reddit.com
u/External-Quarter2147 — 4 days ago

Punch cards for safe data storage

I have been doing some experiments with storing data on punch cards, its a safe way to store smaller amounts of data, perhaps up to 64 bytes.

Back in the day the military used some radio equipment that read data from punched cards, and that's where i got the idea for this project.

The punch card can be made from stainless steel and use reed-solomon coding to allow for error correcting if parts of the card are missing. A stainless steel card would probably keep data storage for thousands of years if reasonably protected from the elements. Its also completely EMP resistant.

Its hard for hackers to get to the card, and it can be kept on a necklace for example.

A bitcoin key, or a 128-bit AES encryption key can easily be put on a punch card, or a password of some sort. Reading the punch card is easy with a computer with a Python script and a webcam. Has anyone else thought about this?

https://preview.redd.it/84b2md7lya0h1.png?width=1280&format=png&auto=webp&s=9db266c5db9526a2297ec9b361b7d82ac5a1af28

reddit.com
u/External-Quarter2147 — 4 days ago

Datastorage on punch cards, and reading them optically

I have been doing some experiments with storing data on punch cards, its a safe way to store smaller amounts of data, perhaps up to 64 bytes.

Back in the day the military used some radio equipment that read data from punched cards, and that's where i got the idea for this project.

The punch card can be made from stainless steel and use reed-solomon coding to allow for error correcting if parts of the card are missing. A stainless steel card would probably keep data storage for thousands of years if reasonably protected from the elements. Its also completely EMP resistant.

Its hard for hackers to get to the card, and it can be kept on a necklace for example.

A bitcoin key, or a 128-bit AES encryption key can easily be put on a punch card, or a password of some sort. Reading the punch card is easy with a computer with a Python script and a webcam. Has anyone else thought about this?

https://preview.redd.it/hss2nhlpna0h1.png?width=1280&format=png&auto=webp&s=021d4c90ecd1a48ccb6f55cd733dc863475ca399

reddit.com
u/External-Quarter2147 — 4 days ago

Safe data storage on punch cards

I have been doing some experiments with storing data on punch cards, its a safe way to store smaller amounts of data, perhaps up to 64 bytes.

The punch card can be made from stainless steel and use reed-solomon coding to allow for error correcting if parts of the card are missing. A stainless steel card would probably keep data storage for thousands of years if reasonably protected from the elements. Its also completely EMP resistant.

Its hard for hackers to get to the card, and it can be kept on a necklace for example.

A bitcoin key, or a 128-bit AES encryption key can easily be put on a punch card, or a password of some sort. Reading the punch card is easy with a computer with a Python script and a webcam. Has anyone else thought about this?

https://preview.redd.it/qtxu5jzmja0h1.png?width=1280&format=png&auto=webp&s=0a91185b132ed748b9b2e51690d90e057395113f

reddit.com
u/External-Quarter2147 — 4 days ago

Hur mycket pengar ska man investera?

Jag är en medelålders man, bor i bostadsrätt utan barn tillsammans med sambo, vi har bra jobb båda två och tjänar runt 120 000 kr före skatt tillsammans varje månad. Vi har det mesta vi vill ha, och saknar inte något, vi har båda rest ganska mycket och är nöjda med det. Enligt "min pension" kommer vi båda få cirka 80% av vår inkomst i pension om vi går vid riktåldern på 68.

Många av våra vänner berättar att man ska spara i aktier och fonder, och vi har sparat några hundra tusen i olika aktiefonder, och har en del pengar på sparkonto, men det är inte några miljonbelopp.

Jag ställer mig bara lite frågande till vad man ska använda pengarna som sparas till? Jag är inte typen som längtar efter en ny bil, eller en sommarstuga, och mitt arbete är lite av ett "kall", så jag kommer inte gå i pension tidigare. Eftersom ingen av oss har några barn, så finns det inte någon att spara till eller lämna över något till.

Finns det då någon direkt poäng med att spara? Och hur mycket är rimligt att ha sparat i så fall?

reddit.com
u/External-Quarter2147 — 4 days ago

Modern take on punch cards and secure data stage

What are punch cards?

Punch cards are almost forgotten today, the last machines to use them were retired back in the 80s. There are some exceptions though, some industrial machines have survived to this day and still use them in small scale.

The biggest drawback with punched cards are that they don't store very much information. Back in the day they were often 72 bytes, and you needed a lot of them for a Fortran or Algol program. They do how ever present some interesting advantages, they har hard to hack, and they can be made from material that's nearly indestructible like stainless steel, or materials that are very easy to destroy like dissolving paper.

Designing a new punch card

Making a new punch card from scratch lets you decide lots of these things your self. With optical recognition holes are good for 1/0 since they are easy to find with OpenCV. For size 128 bytes is a good value since you can store a good random password that's really safe with that information level. A card size of approximately 120x70mm is small enough to fit in a back pocket or in a nice necklace around your neck for safe keeping.

Some kind of error correction or detection is also a useful when dealing with OpenCV, I there fore added one parity bit that works as a check sum for every byte on the punch card. As for hole size I worked out that 3mm works good with both recognition and 3D-printing.

Reading a punch card

Reading the punch card is done using a Logitech 920 HD web camera 200mm above a dark table, and the card is made from light grey plastic. A raster is put over the card, and the colour of each point in the matrix is measured. If its dark, there is a hole, and a "1" is put into the matrix. If the value is grey, the value is "0".

The program can move the raster around the image with WASD for x/y moves, and rotate with IO. Its also possible to scale it with GH. Using shift increases the speed of the moves. The resulting scan result looks like this for the card used.

So what are they for?

Well, there are a lots of uses for punch cards!

  • Safe keeping of large passwords
  • Use as key card in locking mechanisms
  • Bitcoin wallet
  • Educational use to teach about computer history
  • Let kids experiment with binary values and learn mathematics
  • Encryption keys

https://preview.redd.it/z5nlzp30f40h1.png?width=1157&format=png&auto=webp&s=9d93fd681f02b3a464d5f367d218b722897c23e5

How much can you store on a card?

There is nothing preventing using bigger cards, perhaps 64 bytes would be possible but that's something like an A4 paper in size. Several cards can also be used to carry a message together.

Even though the card stores 127 bits, if you only use the 94 printable ASCII characters(letters, numbers and special characters) the practical entropy is only 105 bits. And the card is actually 143 bits, but my standard uses 16 of them for parity control. Even 80-bits is considered strong today.

https://preview.redd.it/ivtv4rm1f40h1.png?width=1280&format=png&auto=webp&s=38f83e560af8c366453fd590be0b88ec47876832

Shared secrets?

Not a problem! A card can be split into a number of parts, and only together will the owners have the code. This is unless one person gets only one bit, then that could be calculated from the parity bit.

https://preview.redd.it/ftymp6i2f40h1.png?width=720&format=png&auto=webp&s=74f9dc0449cd7c67b6dd187367af288ae6d5b436

Data recovery and error correctionwith Reed-Solomon

Using a parity bit enables the loss of one bit on every byte, but the loss can be bigger than that. One possibility is to use Reed-Solomon error correction, that's used in a lot of applications including the Voyager space probes.

Doing some experiments with reedsolo from RSCodec Python library, you can test different layers of security. Using 12 bytes of data on the card allowes for 4 bytes of ECC for a total of 16 bytes. That should provide the possibility to recover two completely corrupted bytes or 4 known missing bytes.

https://preview.redd.it/fadthuf3f40h1.png?width=1280&format=png&auto=webp&s=b98346ab3d926985897e1505e6db268a53ca5b64

Encoding the 10 byte message "helloworld" with 6 ECC bytes gives a total of 16 bytes. The message coded with Python RSCode is [104, 101, 108, 108, 111, 119, 111, 114, 108, 100, 192, 96, 126, 3, 95, 130]. A few tests shows that it does actually work and can recover missing bits.

https://preview.redd.it/gdy0k34bf40h1.png?width=1017&format=png&auto=webp&s=4b471eed85a98f4ba3ace2935a494ac47806d86d

reddit.com
u/External-Quarter2147 — 5 days ago

Safe storage of encryption keys

I have been experimenting with how to store encryption keys in s safe way, and am now trying punch cards. A 128-bit AES key is easy to fit on a punch card big as a wallet, in theory you could probably make it half that size. The cards are read with a web camera with a Python program using OpenCV, its all very simple.

The punch card has a few advantages, they cant be hacked or stolen with online theft, if made from stainless steel they are also fire proof, water proof and have a longevity of hundreds of years.

A bitcoin private key is 32 bytes, i think that possible to put onto one card. The cards hade also been tested with parity bits and reed-solomon coding to allow for a damaged card to be read and used.

Has anyone experimented with this?

https://preview.redd.it/1b7qxwrc020h1.png?width=900&format=png&auto=webp&s=5ce262468696de1651167567523c3bc2828bf749

https://preview.redd.it/j9l5wobd020h1.png?width=1157&format=png&auto=webp&s=64cd5266bef3e0b12a45f28df9e55f56db6f4a51

https://preview.redd.it/hn3eupae020h1.png?width=320&format=png&auto=webp&s=f9f966a4f0e076e24336cf54bd3568e3329d3bbc

https://preview.redd.it/abrkl3te020h1.png?width=326&format=png&auto=webp&s=df00e1f3c1392634500d6db2294ade5fb8868c8f

https://preview.redd.it/on1qm3nf020h1.png?width=740&format=png&auto=webp&s=7987c0c479b277ed647e4f613bd35545ceb313c4

reddit.com
u/External-Quarter2147 — 5 days ago

Modern punch cards for safe data storage

Punch cards are almost forgotten today, the last machines to use them were retired back in the 80s. There are some exceptions though, some industrial machines have survived to this day and still use them in small scale.

The biggest drawback with punched cards are that they don't store very much information. Back in the day they were often 72 bytes, and you needed a lot of them for a Fortran or Algol program. They do how ever present some interesting advantages, they har hard to hack, and they can be made from material that's nearly indestructible like stainless steel, or materials that are very easy to destroy like dissolving paper.

Making a new punch card from scratch lets you decide lots of these things your self. With optical recognition holes are good for 1/0 since they are easy to find with OpenCV. For size 128 bytes is a good value since you can store a good random password that's really safe with that information level. A card size of approximately 120x70mm is small enough to fit in a back pocket or in a nice necklace around your neck for safe keeping.

Some kind of error correction or detection is also a useful when dealing with OpenCV, I there fore added one parity bit that works as a check sum for every byte on the punch card. As for hole size I worked out that 3mm works good with both recognition and 3D-printing.

Reading the punch card is done using a Logitech 920 HD web camera 200mm above a dark table, and the card is made from light grey plastic. A raster is put over the card, and the colour of each point in the matrix is measured. If its dark, there is a hole, and a "1" is put into the matrix. If the value is grey, the value is "0".

The program can move the raster around the image with WASD for x/y moves, and rotate with IO. Its also possible to scale it with GH. Using shift increases the speed of the moves. The resulting scan result looks like this for the card used.

There is nothing preventing using bigger cards, perhaps 64 bytes would be possible but that's something like an A4 paper in size. Several cards can also be used to carry a message together.

Even though the card stores 127 bits, if you only use the 94 printable ASCII characters(letters, numbers and special characters) the practical entropy is only 105 bits. And the card is actually 143 bits, but my standard uses 16 of them for parity control. Even 80-bits is considered strong today.

Shared secrets? Not a problem! A card can be split into a number of parts, and only together will the owners have the code. This is unless one person gets only one bit, then that could be calculated from the parity bit.

Using a parity bit enables the loss of one bit on every byte, but the loss can be bigger than that. One possibility is to use Reed-Solomon error correction, that's used in a lot of applications including the Voyager space probes.

Doing some experiments with reedsolo from RSCodec Python library, you can test different layers of security. Using 12 bytes of data on the card allowes for 4 bytes of ECC for a total of 16 bytes. That should provide the possibility to recover two completely corrupted bytes or 4 known missing bytes.

Encoding the 10 byte message "helloworld" with 6 ECC bytes gives a total of 16 bytes. The message coded with Python RSCode is [104, 101, 108, 108, 111, 119, 111, 114, 108, 100, 192, 96, 126, 3, 95, 130]. A few tests shows that it does actually work and can recover missing bits.

https://preview.redd.it/fy72n842muzg1.png?width=1157&format=png&auto=webp&s=262952e11b2408bc83c9079a4626d3d329747717

https://preview.redd.it/mv6kiny3muzg1.png?width=1280&format=png&auto=webp&s=68add8915a29db9313f55043bf58a39a0346c1d9

https://preview.redd.it/r2k2pxb5muzg1.png?width=320&format=png&auto=webp&s=19b9010571fb87586fe54e54d7187c22bb5b88f2

https://preview.redd.it/z4todk87muzg1.png?width=720&format=png&auto=webp&s=c72a0b172533a24c150a35eb8af8d85c8f037e6e

https://preview.redd.it/nm8nc268muzg1.png?width=1280&format=png&auto=webp&s=81cfd500ea687c025eead0614e670641c287d2a4

reddit.com
u/External-Quarter2147 — 7 days ago