Questions tagged [caesar-cipher]

A very simple cipher in which the letters of the alphabet are substituted by a different letter that have a fixed distance to the original letter.

A very simple cipher in which the letters of the alphabet are substituted by a different letter that have a fixed distance to the original letter.

Named after Julius Caesar, because he is said to have used it.

788 questions
1
vote
1 answer

Last character is not being overwritten while copying one file into another file containing pre existing text

I am trying to write a simple C program that encrypts a text file using the offset cipher. Here is what I want the program to do: Take a text file, read it character by character and after incrementing each character by some integer value (which…
1
vote
1 answer

Fix Cipher decryption

I am trying to fix a code that takes a ciphered input file and runs a frequency analysis of the letters and then decrypts the ciphered text. I got it to work for the most part, but the ciphered text is not fully decrypted. Can I get some suggestions…
FoxCode
  • 15
  • 4
1
vote
1 answer

How do I change an item in a list to another item from another list?

Basically I've been trying to make a Caesar Cipher type program, caesar=[ "x", "y", "z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w" ] tempword=input('What would you like to…
zoid_
  • 15
  • 4
1
vote
0 answers

How to only output desired error message when invalid key is given in Caesar cypher python?

I am writing a python file that can encrypt and decrypt text files with Caesar cypher via python. This is the code I have been writing: import sys import argparse import string parser = argparse.ArgumentParser() parser.add_argument("-i",…
Noob
  • 71
  • 9
1
vote
2 answers

My Caesar Cipher is not returning uppercase letters (Python 3.10)

I'm working on a Caesar Cipher for my class, and it prints everything just fine. However, if I put uppercase letters in the plaintext, the ciphered text comes out lowercase. #Main program def main(): alphabet =…
Anthony K
  • 11
  • 2
1
vote
1 answer

Problem with Caesar cipher in x86 assembly

I have the following instructions as part of a Caesar cipher program. overFlow: sub bl, 1Ah ret underFlow: add bl, 1Ah ret correctFlow: cmp bl, 7Ah jg overFlow cmp bl, 61h jl underFlow ret enc_byte: add bl,…
Jan
  • 25
  • 6
1
vote
1 answer

CS50 Caesar Cipher Bug

Okay, so I am completely stumped. I cannot understand why this programs output acts as if there is a random key everytime. This program: #include #include #include #include #include int main(int…
jlietz93
  • 13
  • 2
1
vote
1 answer

cs50 caeser, I don't understand check50 fail

Below is my code and it is working for 10/11 checks, but shows the error message for this one: :( encrypts "world, say hello!" as "iadxp, emk tqxxa!" using 12 as key Cause expected "ciphertext: ia...", not "ciphertext: ia..." Log running ./caesar…
user250888
  • 11
  • 1
1
vote
1 answer

Develop an application that uses the Julius Caesar cipher with keys greater than 1

given a text i have to encrypt it and decrypt it with Caesar method. A user will give a key and this key could have more than 4 digit. to cipher the text each digit must have it table. example: text=don't touch my spaghetti key=1234 //this key has…
Qhelvin
  • 11
  • 1
1
vote
1 answer

Caesar cipher encryption decryption not working as expected due to input issues

#include #include void dec(); int main() { char pt[50], ct[50]; int key, i; printf("Enter the plain text: "); scanf("%[^\n]", pt); printf("Enter the key: "); scanf("%d", &key); for (i = 0; i <…
1
vote
2 answers

Caesars Cipher / Shift Caesar code is not working

I am working on an algorithm and i need some help. Here s the problem: One of the simplest and most widely known ciphers is a Caesar cipher, also known as a shift cipher. In a shift cipher the meanings of the letters are shifted by some set…
Robert
  • 23
  • 3
1
vote
1 answer

python caesar cipher brute force decrypting

I am doing my final for my grade 11 computer science and I have to make a caesar cipher with encryption, decryption and brute force and I am completely stuck on the brute force. Can anyone help me?
Oban
  • 11
  • 1
1
vote
0 answers

encryption printing unwanted spaces in C. Any ideas as to why?

In C, my program will encipher a user input by an arguement integer, and output new characters. Everything works except what seems like 5 characters (j-o), they print the new character but also include a space after. Why would these specific…
JLAc91
  • 35
  • 3
1
vote
1 answer

Issue with Caesar cypher project

I'm making a Caesar cypher project in Python for my school assignment, I've done the base but I'm confused on how to move one letter forward. Recommend any methods? def encrypt(word): # Somehow move one letter forward. secret_word =…
LazyBeast
  • 45
  • 4
1
vote
1 answer

Using DrJava, how do I shift the characters stored in a 2d array and store in a different location using a Caesar shift cipher

**After collecting a number between 1 and 4 from the user, I need to use a Caesar shift cipher to shift every letter in the array forward by the number the user provided. I decided to use if statements for every possible character that could be in…