#learn programming
Explore tagged Tumblr posts
blubberquark · 2 years ago
Text
Why Not Write Cryptography
I learned Python in high school in 2003. This was unusual at the time. We were part of a pilot project, testing new teaching materials. The official syllabus still expected us to use PASCAL. In order to satisfy the requirements, we had to learn PASCAL too, after Python. I don't know if PASCAL is still standard.
Some of the early Python programming lessons focused on cryptography. We didn't really learn anything about cryptography itself then, it was all just toy problems to demonstrate basic programming concepts like loops and recursion. Beginners can easily implement some old, outdated ciphers like Caesar, Vigenère, arbitrary 26-letter substitutions, transpositions, and so on.
The Vigenère cipher will be important. It goes like this: First, in order to work with letters, we assign numbers from 0 to 25 to the 26 letters of the alphabet, so A is 0, B is 1, C is 2 and so on. In the programs we wrote, we had to strip out all punctuation and spaces, write everything in uppercase and use the standard transliteration rules for Ä, Ö, Ü, and ß. That's just the encoding part. Now comes the encryption part. For every letter in the plain text, we add the next letter from the key, modulo 26, round robin style. The key is repeated after we get tot he end. Encrypting "HELLOWORLD" with the key "ABC" yields ["H"+"A", "E"+"B", "L"+"C", "L"+"A", "O"+"B", "W"+"C", "O"+"A", "R"+"B", "L"+"C", "D"+"A"], or "HFNLPYOLND". If this short example didn't click for you, you can look it up on Wikipedia and blame me for explaining it badly.
Then our teacher left in the middle of the school year, and a different one took over. He was unfamiliar with encryption algorithms. He took us through some of the exercises about breaking the Caesar cipher with statistics. Then he proclaimed, based on some back-of-the-envelope calculations, that a Vigenère cipher with a long enough key, with the length unknown to the attacker, is "basically uncrackable". You can't brute-force a 20-letter key, and there are no significant statistical patterns.
I told him this wasn't true. If you re-use a Vigenère key, it's like re-using a one time pad key. At the time I just had read the first chapters of Bruce Schneier's "Applied Cryptography", and some pop history books about cold war spy stuff. I knew about the problem with re-using a one-time pad. A one time pad is the same as if your Vigenère key is as long as the message, so there is no way to make any inferences from one letter of the encrypted message to another letter of the plain text. This is mathematically proven to be completely uncrackable, as long as you use the key only one time, hence the name. Re-use of one-time pads actually happened during the cold war. Spy agencies communicated through number stations and one-time pads, but at some point, the Soviets either killed some of their cryptographers in a purge, or they messed up their book-keeping, and they re-used some of their keys. The Americans could decrypt the messages.
Here is how: If you have message $A$ and message $B$, and you re-use the key $K$, then an attacker can take the encrypted messages $A+K$ and $B+K$, and subtract them. That creates $(A+K) - (B+K) = A - B + K - K = A - B$. If you re-use a one-time pad, the attacker can just filter the key out and calculate the difference between two plaintexts.
My teacher didn't know that. He had done a quick back-of-the-envelope calculation about the time it would take to brute-force a 20 letter key, and the likelihood of accidentally arriving at something that would resemble the distribution of letters in the German language. In his mind, a 20 letter key or longer was impossible to crack. At the time, I wouldn't have known how to calculate that probability.
When I challenged his assertion that it would be "uncrackable", he created two messages that were written in German, and pasted them into the program we had been using in class, with a randomly generated key of undisclosed length. He gave me the encrypted output.
Instead of brute-forcing keys, I decided to apply what I knew about re-using one time pads. I wrote a program that takes some of the most common German words, and added them to sections of $(A-B)$. If a word was equal to a section of $B$, then this would generate a section of $A$. Then I used a large spellchecking dictionary to see if the section of $A$ generated by guessing a section of $B$ contained any valid German words. If yes, it would print the guessed word in $B$, the section of $A$, and the corresponding section of the key. There was only a little bit of key material that was common to multiple results, but that was enough to establish how long they key was. From there, I modified my program so that I could interactively try to guess words and it would decrypt the rest of the text based on my guess. The messages were two articles from the local newspaper.
When I showed the decrypted messages to my teacher the next week, got annoyed, and accused me of cheating. Had I installed a keylogger on his machine? Had I rigged his encryption program to leak key material? Had I exploited the old Python random number generator that isn't really random enough for cryptography (but good enough for games and simulations)?
Then I explained my approach. My teacher insisted that this solution didn't count, because it relied on guessing words. It would never have worked on random numeric data. I was just lucky that the messages were written in a language I speak. I could have cheated by using a search engine to find the newspaper articles on the web.
Now the lesson you should take away from this is not that I am smart and teachers are sore losers.
Lesson one: Everybody can build an encryption scheme or security system that he himself can't defeat. That doesn't mean others can't defeat it. You can also create an secret alphabet to protect your teenage diary from your kid sister. It's not practical to use that as an encryption scheme for banking. Something that works for your diary will in all likelihood be inappropriate for online banking, never mind state secrets. You never know if a teenage diary won't be stolen by a determined thief who thinks it holds the secret to a Bitcoin wallet passphrase, or if someone is re-using his banking password in your online game.
Lesson two: When you build a security system, you often accidentally design around an "intended attack". If you build a lock to be especially pick-proof, a burglar can still kick in the door, or break a window. Or maybe a new variation of the old "slide a piece of paper under the door and push the key through" trick works. Non-security experts are especially susceptible to this. Experts in one domain are often blind to attacks/exploits that make use of a different domain. It's like the physicist who saw a magic show and thought it must be powerful magnets at work, when it was actually invisible ropes.
Lesson three: Sometimes a real world problem is a great toy problem, but the easy and didactic toy solution is a really bad real world solution. Encryption was a fun way to teach programming, not a good way to teach encryption. There are many problems like that, like 3D rendering, Chess AI, and neural networks, where the real-world solution is not just more sophisticated than the toy solution, but a completely different architecture with completely different data structures. My own interactive codebreaking program did not work like modern approaches works either.
Lesson four: Don't roll your own cryptography. Don't even implement a known encryption algorithm. Use a cryptography library. Chances are you are not Bruce Schneier or Dan J Bernstein. It's harder than you thought. Unless you are doing a toy programming project to teach programming, it's not a good idea. If you don't take this advice to heart, a teenager with something to prove, somebody much less knowledgeable but with more time on his hands, might cause you trouble.
350 notes · View notes
jahblogs · 7 months ago
Text
2 notes · View notes
pancakesandpopcorn · 1 year ago
Text
Tumblr media
And when all else fails we return to the things close to our hearts
5 notes · View notes
creativepage · 2 years ago
Text
LEARN PROGRAMMING!
For begginners it is fast in my company
Learn backend and frontend programming languages and codes
Edit cides in cide editors
Learn programming in youtube videoblogs
Cide editors . VISUAL STUDIO CODES
................................................
Learn programming in this companny Geekbreens.team
Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media
LEARN PROGRAMMING IT IS SO EASY, GREATE!
CREATE YOUR OWN COMPANY!
4 notes · View notes
d1mndnthr0ugh · 7 months ago
Text
I've been on and off Scratch for 13 years and I prolly wouldn't have learned as much as I have about coding without it. now I've dabbled in json and c++ and have a fairly solid understanding of lua, but I still occasionally use Scratch while I'm making something in the others because it's a great way to make sure you know how something works. If my idea doesn't work in the silly block code then it won't be functional when I translate to typed code.
all of the languages I learned were for things I was doing in minecraft actually, I think that's kinda funny
also I forgot codecademy existed... that may have aided my learning of glsl
please learn how to code
like, if you're bored today, and not doing anything,
learn a little bit of coding please
34K notes · View notes
virtualcuriosities · 21 days ago
Text
0 notes
the-today-man · 28 days ago
Text
Brain Training for Kids: How to Turn Your Child Into a Mini Einstein
By: Tyler West Facebook Twitter Instagram Pinterest Twitter Early childhood development is crucial for laying the foundation for a child’s future success. The first few years of life are marked by rapid brain growth, with about 90% of a child’s brain developed by age six. This period is not only about physical growth but also encompasses cognitive, emotional, and social development.…
1 note · View note
mobileandapps · 1 month ago
Text
How to Learn Coding for Free
Learning to code is one of the most valuable skills you can acquire in today’s digital age. Whether you’re looking to switch careers, build your own projects, or simply understand the technology shaping our world, knowing how to learn coding is the first step. The good news? You don’t need to spend a fortune to get started. There are countless free resources, platforms, and communities available…
1 note · View note
roboticsysinfo · 3 months ago
Text
Start Your App Development Journey Today with Robotic Sysinfo: The Best App Development Company in Karnal!
Tumblr media
I want to be an app developer, but I feel like I'm starting from scratch. Trust me, you're not alone. It feels like the tech world is some exclusive club, and you're standing outside looking in. But here's the thing: becoming an app developer, even with no experience, is 100% within your reach. It's all about taking that first step and staying motivated, no matter what. Our team has 5+ years of experience in app development solutions. So, let's get started and talk about how you can make this dream a reality—without any experience in your pocket yet.
Problem: The Struggle to Start
We've all been there. You want to break into a new field, but the amount of knowledge and skills you need feels impossible to conquer. You might be wondering: Can I even do this? Where do I start? What are all the things that I need to know to start building an application from scratch? It's pretty easy to get the feeling of lagging behind, especially when you view some of those super cool applications that you have installed on your mobile or the developers coding in lightning speed. It feels as though everyone has it all covered, and here you are stuck.
Solution: Your Pathway to Becoming an App Developer
Let's break this down into manageable steps. This journey may take a while, but every step forward will help you get closer to your goal.
Learn the Basics of Programming Languages
Code knowledge is what one needs in order to make an app. Don't be too worried though; you are not supposed to be a wizard overnight. Start learning the basics of some programming language, which will be good for beginners. Swift is for iOS apps while Kotlin is suitable for Android. JavaScript is ideal for something universally available. Go for one at a time. Free tutorials abound on the internet, while platforms like Codecademy or Udemy present structured courses so you can work your way toward getting the basics down.
Now get out there and start building something
Now, fun part: Create! Yes, you will not build the next Instagram tomorrow; that is okay, too. Try something simple for now, say a to-do list app or a weather app. You aren't going for a masterpiece, but for trying, experimenting, and learning. Don't sweat it if everything doesn't seem to work exactly as expected right off; that is how it is in the process of learning.
Participate in Developer Community
Sometimes, building an app on your own can feel lonely, but guess what? You don't have to do this by yourself. There are entire communities of developers out there—many of them started from scratch just like you. Forums like Stack Overflow, Reddit's r/learnprogramming, or local coding meetups are places where you can ask questions, get advice, and make connections. These communities are full of people who want to see you succeed, and they'll help you get through the tough patches.
Create a Portfolio of Your Work
Once you’ve started building apps, showcase them! Create a portfolio that highlights your work, even if it’s just a few small projects. A portfolio is essential to landing your first job or freelance gig. Make it public on platforms like GitHub or build your own website. Show the world that you’re serious about your new career, and let potential employers or clients see your growth.
Take Online Courses to Take It to the Next Level
If you want to level up your skills, consider enrolling in a structured online course. Websites like Udacity, Coursera, or freeCodeCamp offer great resources for both beginners and intermediate learners. Getting a certification can also boost your credibility and show potential employers that you've got the skills to back up your passion.
Look for Freelance Opportunities or Internships
With that said, as you build some small confidence, find opportunities where you can implement this knowledge into the real world. Start applying for internships or volunteer work. Don't be afraid to take small gigs; places like Upwork and Fiverr offer many smaller projects, just right for those starting out. Every single one of them teaches you something and gets you a little bit closer to what you want to be.
Why You Should Wait: The Tech Industry is Booming
Here's the exciting part—the app development industry is growing fast. According to Statista, the mobile app market generated over $407 billion in 2023. This means there are endless opportunities for developers. Whether you're building the next great social media app, a life-saving health app, or an awesome game, the demand is huge. And it's only going to keep growing.
One company that started with zero experience and grew into something amazing is Robotic Sysinfo, an app development company in Karnal, India. Now, our team has 5+ years of experience in this field. They started small, and through dedication, they’ve become a leading player in the app development world. Their story is proof that with persistence, even those who start with no experience can build something great.
Read More:
Conclusion: You’ve Got This!
It's time to stop wondering whether you can. Yes, you should try! The process of becoming an app developer isn't an overnight thing; however, it can happen if you start small, continue pushing, and embrace the journey. You would surely stumble, but with every line of code written, you are getting stronger and stronger before you even realize how far you have come.
Remember: the world needs more developers, and this is your chance to be in this exciting world. Whether you aspire to create something big or are just learning because you love the idea, today is the best time to fit into it. Your future as an app developer begins today. So, let's get started on your journey with a real app development company like Robotic Sysinfo!
0 notes
aicorr · 4 months ago
Text
0 notes
convelocity · 7 months ago
Text
Tumblr media Tumblr media
It's Tara. Of Waterdeep.
16K notes · View notes
angeaddc · 8 months ago
Text
youtube
1 note · View note
cacmsinsitute · 10 months ago
Text
Machine Learning Fundamentals for Data Analysis
An Overview of Machine Learning and Its Application to Data Analytics
Machine learning (ML) has developed as a key component of data analytics, providing powerful tools and approaches for extracting meaningful patterns and insights from massive volumes of data. At its core, machine learning is a subset of artificial intelligence (AI) that focuses on creating algorithms that can learn from and predict data. This capacity is becoming increasingly important as organizations from diverse industries strive to use data-driven decision-making processes to improve efficiency, optimize operations, and gain a competitive advantage.
Machine learning's importance to data analytics stems from its capacity to automate and increase the accuracy of data analysis processes. Traditional statistical methods, while effective, frequently require pre existing models and assumptions about the data. In contrast, machine learning algorithms can adapt and evolve as they are exposed to new data, revealing previously unknown patterns and relationships. This versatility makes machine learning especially useful for dealing with complicated and high-dimensional datasets that are common in modern data analytics.
Introduction to Supervised and Unsupervised Learning
Machine learning spans a wide range of learning paradigms, with supervised and unsupervised learning being two of the most fundamental.
Supervised learning
Supervised learning entails training a model using a labeled dataset, where each training example is associated with an output label. The goal of supervised learning is to create a mapping from inputs to outputs that can accurately predict labels for new, previously unseen data. This paradigm is analogous to learning with a teacher, in which the model is given the correct responses during training.
Typical supervised learning activities include:
Classification: Assigning inputs to pre-established groups. Ascertaining whether or not an email is spam, for example.
Regression: Making continuous value predictions. For instance, estimating home values depending on attributes like size and location.
In supervised learning, popular methods include neural networks, support vector machines (SVM), decision trees, logistic regression, and linear regression. From illness diagnosis in healthcare to fraud detection in finance, these algorithms have many uses.
Unsupervised Learning
On the other hand, unsupervised learning works with unlabeled information. The objective is to deduce the inherent organization found in a collection of data points. The model analyzes the inherent qualities of the data in order to find patterns and relationships without the need for predefined labels.
The key tasks in unsupervised learning include:
Clustering: Combining related data points together. Market segmentation, in marketing, is the grouping of clients with similar purchase behaviors.
Dimensionality Reduction: Reducing the amount of random variables being considered. Principal Component Analysis (PCA) is a technique for visualizing high-dimensional data and enhancing computational performance.
Unsupervised learning algorithms include k-means clustering, hierarchical clustering, and Gaussian Mixture Models. These techniques are critical in exploratory data analysis, allowing analysts to find trends and patterns without prior understanding of the data structure.
Conclusion
Understanding the fundamentals of machine learning is critical for anyone working in data analytics. Supervised and unsupervised learning are effective frameworks for modeling and analyzing complicated information, with each having distinct capabilities adapted to specific sorts of challenges. As the volume and complexity of data increases, analysts will need to understand these machine learning approaches in order to glean useful insights and make informed judgements. Data professionals can improve their ability to harness the full potential of their data by incorporating machine learning into their analytical toolkit, resulting in increased creativity and efficiency throughout their organizations.
Are you ready to improve your data analytics skills using machine learning? CACMS Institute in Amritsar offers complete data analytics training. We provide hands-on practical training, flexible scheduling, and an industry-specific curriculum to guarantee that you obtain the information and expertise required to flourish in your career.
Enroll in one of our next batches today to begin your journey to understanding data analytics and machine learning. Contact us at +91 8288040281 or visit CACMS Institute for more information. Don't pass up this opportunity to boost your career with the greatest data analytics training in Amritsar!
0 notes
kenchann · 29 days ago
Text
Tumblr media Tumblr media
ピポ ♥️♠️🍤🐱
2K notes · View notes
alesshi · 2 months ago
Text
Tumblr media Tumblr media
Ranma's in love with a guy 🤭
3K notes · View notes