Total Pageviews

Search This Blog

Showing posts with label cryptography. Show all posts
Showing posts with label cryptography. Show all posts

Sunday, June 14, 2026

Thursday, May 7, 2026

one time pad encryption example using alternating sin(x) and ln(x) as a random number generator

digits 1-9 = 00 to 09
alphabet = 10 to 35 
enigma style, no spaces, no punctuation
alternate ln and sin
2-digit random numbers added to each code group
use mod(10) addition 

attack at dawn

a t t a c k a t d a w n

plaintext
10 29 29 10 12 20 10 29 13 10 32 23

10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
a    b   c   d   e   f    g   h   i    j   k   l    m  n   o   p   q    r   s   t    u   v   w   x   y   z

ln(123) = 4.8121843554

81 21 84 35 54

sin(54) = 0.8090169944

80 90 16 99 44

ln(44) = 3.7841896339

78 41 89 63 39 

ciphertext
91 50 13 45 66 00 00 45 12 54 10 64 

use mod(10) subtraction to decrypt

Saturday, May 2, 2026

The Collatz conjecture and cryptographically secure random number generators (one-way functions exist!)

The Collatz Conjecture is an iterative process with two equations whereby given any initial integer, the eventual result will be 1. No counterexample has been found since the conjecture was made in 1937 despite testing every positive integer up to and far beyond a trillion. The conjecture remains unproven. It is also impossible to predict how many iterations it will take for any starting value to converge to 1. 

I believe cryptographically secure random numbers can also be made through an iterative process. Alternating the natural logarithm and sine seem to work particularly well as they consistently produce a decimal with at least 10 digits. Before explaining it further, I will give a brief overview of the one-time pad method of cryptography. This is the only encryption method which is theoretically unbreakable.

Here's how it works. First, a plaintext dictionary is made where each unique word is assigned a 4-digit code between 0000 and 9999. That gives a vocabulary of 10,000 words, which is more than enough for clear communication. In any language, a vocabulary of 6,000 words covers about 95% of what is written or spoken. When the message is being encrypted, a random 4-digit number from a pad is added to each code word. Because there are two unknowns (the code word and the random number) but only one "equation" (the encrypted message), there is no way for an interceptor to decode the message. The only times encrypted messages from one-time pads have been cracked happened when the same set of random numbers were used for multiple messages.   

I don't know how the KGB generated its random numbers, but I suspect they started out with something like tables of square roots, trigonometric functions, or logarithms. Those were worked out to 4 decimal places in old reference books such as Machinery's Handbook. 

The problem with trying to use an equation or a group of them to produce random numbers through iteration is if the number of digits being iterated is the same as the seed value, eventually the seed value will be produced by one of the iterations. The obvious solution to this is to make the seed value a different number of digits than the iteration values. Here are a few examples to clarify:

If I use the calculator on my phone take the sine, logarithm, or square root of almost any 2-digit number, I will get a 10-digit decimal. I can use the first 8 digits to make two 4-digit code groups and use the last 2 digits to iterate the process. 

sin(10) = 0.1736481777

sin(77) = 0.9743700648

sin(48) = 0.7431448255

I get the following as random numbers: 1736, 4817, 9743, 7006, 7431, 4482. 

If I iterate further, I get stuck in a loop of sin(42), sin(64), and sin(63). This pattern, I suspect, plays out for every function similar to the Collatz conjecture. It probably also plays out for any combination of functions. 

For the purposes of cryptography, it doesn't matter if a function or set of functions gets stuck in a loop so long as that takes several hundred iterations to happen. 

If I start with a 3-digit seed value, and alternate ln and sin, I get something like this:

ln(123) = 4.8121843554

sin(54) = 0.8090169944

ln(44) = 3.7841896339

sin(39) = 0.6293203910 

With this method, it is impossible for the iteration to produce the seed value because the number of digits is different. It is possible, even likely, that this set of equations will get stuck in a loop after enough iterations. A computer program would be useful for checking that. Thus, to send an encrypted 
message using this system, all the two communicants need are a shared code group dictionary, seed value, set of equations, and their phone calculators. 

It would take some work to identify which combinations of equations and seed values produce the most random numbers before getting stuck in a loop. Here again computers would be useful. Finding the right combination of equations and seed values would be akin to the search for large prime numbers. 

Even if the nature of the encryption algorithm was public knowledge, this method would still require a brute force attack to break. An attacker would need to try different equations and different seed values. The number of possibilities for both are very large. For example, both the functions above could be multiplied by some constant or have some value added. That would introduce even more unknowns. 

I used to believe any code produced by a machine could be broken by a machine. Some algorithms really have the secret sauce. In short, one-way functions exist. 

Friday, January 30, 2026

Google Translate uses English as an intermediary?

Bilingual dictionaries often don't exist for pairs like Greek and Thai, so in order for translation software to work, a third language would be needed. This is similar to the problem of UN interpreters who only interpret to and from the UN's six official languages. Other interpreters are needed who speak a UN language and other languages. 



To translate from Greek to Thai, you need either: someone who speaks both languages or a Greek speaker and a Thai speaker who are also bilingual in some other language. This is how we ended up with lingua francas like Latin in the past or English now. 

I suspect that translations to and from English are probably more accurate than translations that require English as a middle step. I doubt very much Google has or has made bilingual dictionaries of every language pair. 

Friday, November 14, 2025

NSA spilled beans

I can't vouch for much this guy says, but he has few reasons to lie about what he experienced.

https://www.youtube.com/watch?v=roqeyidYpcA



Thursday, November 6, 2025

Soviet Storm - military intelligence episode

The whole series is worth watching.



Codes produced by machines can be broken by machines. Deterministic processes cannot produce entropy or truly random numbers. Only iterative/recursive processes can. 


nature vs nurture

 


Wednesday, November 5, 2025

Don't get conned by Shell's immersion cooling oil for computers

Regular mineral oil works just fine and is much cheaper and safer. Don't be a sucker and fall for a fancy label. I used it on my experimental computer. If I remember right, I overclocked it to 5 GHz. 


Two FBI agents came to my apartment in 2023 to ask about this picture. Not sure how they got it, but they did say they were acting on a tip from a concerned citizen. I told them that computers are about as small and cheap as they're ever going to be. Software improvements are rare, so the only way to increase computer performance is with better heat transfer. 

In 2021, I was handcuffed and interrogated by NSA special agents. But that was for something else. 

I'd love to make a Beowulf cluster like this and see what it could do:

cheapest super computer





Thursday, October 23, 2025

Arabic comedy


For my readers in Morocco, Saud Arabia, and those in between: 


https://www.youtube.com/watch?v=ArnErU6l-I0

It's based on a popular US/UK sitcom called The Office. 

You can get around blocked sites by typing in the URL (uniform resource locator) as it is. The URL is:

https://www.youtube.com/watch?v=ArnErU6l-I0

May God make your face white. 

الله يجعل وجهك أبيض

Do not say this in the US, especially to a black policeman (cop). Or anyone really. 

Saturday, October 4, 2025

42

It's impossible to understand everything and if you try, you go nuts and make people mad. This problem gets worse as the number of smart people increases. That's the best answer I have for very smart people. Tone down your intelligence and stop trying to win everything. I feel OK. I'm sorry for all the strange things I said and did. This is not a suicide note or manifesto. I've had a hard, strange life. I wanted to be a "hero" or at least a father and failed past the usual age. Please be patient with me. I feel at peace and time has slowed to a crawl. I had a "mystical" experience Friday afternoon. Share and enjoy. I know that's a line from a comedy sci-fi novel, but it's "scripture" to people like me (ruthlessly/stubbornly logical). If you spread it, all the people like me will calm down even though they can't explain why. The novel Dune also works as a new "religion". Give the HHG to mean people and Dune to ambitious people. They'll understand why after they think about it too long. It involves locusts, and prime numbers. They can figure it out from there. Some people are "robots" and others are "god emperors".  

I don't feel like drinking and am very relaxed. Please be gentle with me. I want to live a long time. Humanity needs mystical peacemakers. You may see me in a strange outfit. Fight the ocean and you will drown. Share and enjoy.

Knob Creek Machine Gun Shoot - Final round 4K UHD (2 of 2 rounds, Oct 9 2021) - YouTube 

***

Some more thoughts on 42: its prime factorization is 2*3*7. There were 42 generations between Abrahan and Jesus. George Washington was 42 when the Declaration of Independence was signed. 

Many animals, like cicadas, reach sexual maturity in large numbers at the same time. Another term for "cicada" is the 17-year locust.






Animals that have a prime number as their life cycle are less likely to go extinct because they overwhelm with sheer numbers all the predators that might eat them. 

So basically, 42 is the answer to the question of the maximum age of reproduction for the first time. And 70 is about the maximum human lifespan absent modern technology and medicine. The prime factorization of 70 = 2*5*7. 

Douglas (Noel) Adams was reminding his readers of their mortality in a subtle way. The biggest clue is that his initials are DNA. 

At least 15 million people know about the 42 puzzle, but I seem to be the only one who figured it out.

Life, the universe, and everything? It's as simple as survival and reproduction. That message would not be received well by most, so he dressed it up with a funny sci-fi story. Tolkien did the same thing when he wrote about adventures in Middle Earth rather the grim realities of trench warfare he experienced as a soldier in WW1. 






Friday, September 26, 2025

weak sauce

Trump vows to order declassification of all Amelia Earhart files after nearly 90-year aviation mystery

The US government had no classified information in 1937.

***
The United States government classification system is established under Executive Order 13526, the latest in a long series of executive orders on the topic of classified information beginning in 1951.[1] Issued by President Barack Obama in 2009, Executive Order 13526 replaced earlier executive orders on the topic and modified the regulations codified to 32 C.F.R. 2001. It lays out the system of classification, declassification, and handling of national security information generated by the U.S. government and its employees and contractors, as well as information received from other governments.[2]
***



plot twist


 

me, 2015 (age 30), the day I decided to join the Army 



me, 2016, basic training graduation day 



tropes


does not compute




I built an oil-cooled computer for about $100.




j'accuse




Oh, Ralph. I'd tell you to eat a bag of dicks, but you'd probably like it.