Encoding is not encryption · קידוד אינו הצפנה
A common mix-up
- People often say "encoded" when they mean "encrypted". They are not the same.
- Encoding changes the format of data so it can be stored or sent — it is not secret.
- Encryption changes data so that only someone with the key can read it — it is secret.
בלבול נפוץ
- אנשים לעיתים קרובות אומרים "מועבר" כשהם מתכוונים ל"מוצפן". הם אינם אותו דבר.
- העברה משנה את הפורמט של הנתונים כדי שאפשר יהיה לאחסן או לשלוח אותם — היא אינה סודית.
- הצפנה משנה נתונים כך שמי שיש לו את המפתח בלבד יוכל לקרוא אותם — היא היא סודית.
Base64 — a famous encoding
- Base64 rewrites bytes using 64 safe characters. It is used to put images or files inside text (like email).
- Anyone can decode it — no key needed. So base64 hides nothing.
Base64 — העברה מפורסמת
- Base64 כותב מחדש בייטים באמצעות 64 תווים בטוחים. היא משמשת להכנסת תמונות או קבצים לתוך טקסט (כמו בדוא"ל).
import base64
secret = base64.b64encode(b"hello").decode()
print(secret) # aGVsbG8=
print(base64.b64decode(secret).decode()) # back to hello
- כל אחד יכול לפענח אותה — אין צורך במפתח. לכן base64 אינה מסתירה דבר.
Why this matters for security
- If a website "protects" your password with base64, it is not protected at all.
- Real protection needs encryption (with a key) or hashing (one-way). Encoding is just a costume.
מדוע הדבר חשוב לבטיחות
- אם אתר "מגן" על הסיסמה שלך באמצעות base64, היא אינה מוגנת כלל.
- הגנה אמיתית דורשת הצפנה (עם מפתח) או חישוב ( חד-כיווני). העברה היא רק תלבושת.
Try it
- Encode
helloto base64 below. Then imagine decoding it — and remember it is not a secret.
Covers: foundation for IGCSE 2.3 / A-Level 17.1 (encryption).
נסה זאת
- העבר
helloל-base64 למטה. לאחר מכן דמיין את הפיענוח שלו — וזכור שהוא אינו סוד.
כיסוי: בסיס ל-IGCSE 2.3 / A-Level 17.1 (הצפנה).
Common mistakes
- Base64 is encoding — anyone can reverse it, so it gives no security.
- Encoding changes the format; encryption protects the content.
טעויות נפוצות
- Base64 היא קידוד — כל אחד יכול לפתוח אותו, ולכן הוא אינו מספק אבטחה.
- קידוד משנה את הפורמט; הצפנה מגנה על התוכן.
Use base64 to encode the word hello. Encode its bytes and print the result as text. (Notice: anyone can decode it — encoding is not secret.) · השתמש בbase64 כדי לקודד את המילה hello. קודד את הבייטים שלה וprint את התוצאה כטקסט. (שים לב: כל אחד יכול לפענח אותה – קידוד הוא לא סודי.)
Click Run to see the output here. · לחץ על הרץ כדי לראות את התוצא כאן.
An app 'protected' a message as base64 — prove that protects nothing. Decode captured with base64.b64decode and print the text. No key needed. · יישום "הגן" על הודעה כ-base64 – הוכח שההגנה אינה מגנה. פענח את captured עם base64.b64decode והדפס את הטקסט. אין צורך במפתח.
Click Run to see the output here. · לחץ על הרץ כדי לראות את התוצא כאן.