I have created an encryption algorithm for this app I am currently in the process of developing. I was wondering if my code looks "sharp", concise, and most importantly, succinct. I was also wondering if it is secure.
I know that 99% of the time, encryption algorithms that are invented are not secure, however I was wondering if this algorithm is in the 1% of the safe ones.
#Key Size: 128 bytes [recommended] import random import os import time import hashlib def generate_key(key_size): key = os.urandom(key_size) return key; def encrypt(_key, message): letter_ascii =  letter_ascii_final =  ascii_key_value = ''.join(str(ord(x)) for x in str(_key)) for letter in message: letter_ascii.append(ord(letter)) for _letter in letter_ascii: added = int(ascii_key_value) + int(_letter) letter_ascii_final.append(str(added)) return letter_ascii_final; def decrypt(_key, message): message_repieced =  ascii_key_value = ''.join(str(ord(x)) for x in str(_key)) for item in message: _item = chr(int(item)-int(ascii_key_value)) message_repieced.append(str(_item)) return ''.join(message_repieced);