import os import array rSum =0 def encrypt(pt, key): rSum=0 pVal=0 ret=[] for plainByte,keyByte in zip(pt,key): cByte= plainByte^keyByte^pVal^rSum pVal=cByte rSum=(rSum+pVal)%256 ret.append(cByte) return ret def decrypt(pt, key): rSum=0 pVal=0 cByte=0 ret=[] for cByte,keyByte in zip(pt,key): plainByte = cByte ^keyByte^pVal^rSum pVal = cByte rSum = (rSum+pVal)%256 ret.append(plainByte) return ret key=[238, 248, 225, 236, 213, 99, 9, 213, 11, 65, 87, 31, 223, 237, 37, 166, 120, 96, 208, 119, 202, 239, 200, 212, 176, 129, 226, 20, 209, 181, 143, 2, 169, 19, 206, 31, 49, 22, 103, 161, 157, 128, 30, 224, 97, 117, 100, 70, 175, 170, 212, 131, 167, 239, 16, 62, 241, 100, 89, 215, 190, 252, 61, 204, 237, 127, 169, 155, 250, 191, 13, 89, 59, 132, 132, 184, 124, 122, 113, 189, 167, 116, 148, 83, 191, 236, 71, 142, 159, 183, 118, 206, 116, 100, 56, 46, 65, 19, 176, 24, 214, 122, 58, 157] c1=[237, 234, 203, 161, 60, 96, 113, 30, 103, 109, 39, 118, 183, 113, 252, 79, 255, 111, 234, 46, 17, 143, 36, 104, 140, 103, 99, 103, 215, 187, 212, 238, 136, 129, 159, 182, 140, 250, 182, 251, 173, 132, 50, 226, 115, 75, 80, 224, 174, 32, 113, 227, 52, 168, 113, 187, 132, 51, 180, 253, 118, 244, 221, 170, 186, 80, 82, 204, 218, 5, 50, 70, 166, 200, 29, 17, 175, 78, 57, 99, 8, 93, 153, 183, 161, 106, 203, 176, 64, 181, 43, 155, 34, 139, 68, 226, 219, 255, 35, 155, 155, 13, 176, 249, 95, 236, 85, 41, 241, 95, 46, 215, 227, 210, 91, 106, 142, 222, 240, 236, 184, 106, 46, 9, 240, 119, 64, 121, 69, 125, 185, 243, 214, 70, 30, 206, 97, 237, 153, 146, 72, 10, 14, 241, 47, 153, 6, 225, 68, 228, 181, 205, 36, 109, 209, 144, 220, 109, 34, 38, 98, 90, 100, 158, 251, 34, 64, 232, 21, 179, 232, 178, 180, 24, 166, 155, 185, 134, 52, 193, 66, 6, 160, 216, 185, 206, 210, 224, 174, 9, 32, 130, 25, 69, 42, 225, 83, 51, 244, 232, 69, 33, 198, 22, 235, 133, 98, 241, 140, 228, 191, 134, 128, 60, 144, 90, 67, 159, 53, 232, 169, 212, 44, 198, 124, 19, 236, 220, 192, 42, 207, 204] c2=[238, 245, 224, 235, 207, 161, 113, 207, 130, 175, 122, 13, 5, 81, 160, 18, 241, 108, 28, 229, 101, 183, 169, 119, 55, 250, 183, 77, 210, 129, 181, 90, 113, 37, 204, 234, 61, 104, 196, 53, 185, 50, 117, 45, 129, 211, 123, 168, 82, 201, 103, 23, 255, 220, 39, 108, 8, 109, 164, 216, 4, 64, 212, 31, 7, 197, 146, 50, 69, 165, 86, 222, 255, 29, 234, 232, 56, 184, 1, 88, 107, 216, 240, 9, 91, 70, 34, 159, 196, 67, 45, 225, 86, 138, 27, 178, 179, 4, 29, 240, 163, 110, 82, 9, 146, 56, 51, 178, 49, 138, 99, 51, 87, 153, 74, 136, 218, 10, 101, 125, 228, 55, 63, 53, 197, 23, 198, 151, 164, 104, 39, 144, 205, 252, 185, 213, 234, 180, 214, 18, 85, 113, 195, 22, 227, 205, 90, 189, 9, 226, 224, 101, 68, 98, 215, 61, 249, 155, 212, 9, 141, 127, 62, 67, 205, 23, 119, 255, 1, 130, 53, 170, 148, 76, 109, 127, 79, 245, 25, 155, 58, 197, 144, 62, 218, 163, 110, 191, 45, 93, 9, 190, 63, 196, 76, 197, 172, 86, 138, 157, 111, 92, 251, 108, 9, 198, 122, 197, 66, 129, 17, 185, 101, 60, 190, 160, 167, 215, 211, 251, 87, 96, 98, 118, 69, 239, 58, 254, 110, 83, 157, 89, 107, 3, 98, 166, 39, 32, 25, 61, 4, 77, 163, 110, 163, 250, 196, 218, 61, 58, 115, 121, 88, 234, 223, 4, 104, 212, 32, 33, 111, 94, 47, 222, 94, 140, 101, 143, 130, 143, 205, 10, 241, 254, 103, 181, 222] c3=[255, 244, 230, 234, 247, 59, 0, 219, 24, 56, 7, 75, 102, 168, 180, 58, 189, 30, 18, 33, 185, 190, 203, 234, 180, 223, 5, 19, 47, 21, 238, 102, 250, 200, 124, 199, 111, 189, 88, 138, 136, 103, 227, 255, 82, 125, 28, 228, 189, 225, 44, 139, 94, 245, 177, 213, 39, 173, 123, 77, 195, 131, 208, 124, 236, 172, 71, 250, 246, 165, 222, 101, 235, 135, 120, 205, 41, 127, 111, 170, 237, 178, 215, 115, 251, 3, 96, 240, 34, 159, 117, 54, 8, 95, 5, 37, 209, 105, 154, 194, 68, 245, 116, 80, 149, 199, 36, 79, 170, 168, 5, 237, 50, 168, 121, 240, 94, 18, 77, 244, 250, 131, 96, 42, 195, 101, 65, 169, 157, 100, 92, 163, 25, 219, 44, 7, 29, 122, 112, 120, 91, 89, 83, 100, 193, 90, 211, 18, 213, 136, 208, 5, 17, 175, 73, 11, 141, 71, 201, 221, 16, 2, 121, 146, 250, 41, 124, 87, 108, 186, 253, 78, 132, 136, 120, 190, 222, 6, 159, 120, 234, 25, 56, 68, 247, 149, 8, 126, 220, 225, 250, 74, 204, 147, 167, 246, 245, 76, 140, 40, 90, 5, 10, 35] c4=[241, 242, 245, 171, 239, 178, 27, 10, 17, 130, 75, 72, 125, 135, 123, 37, 204, 158, 172, 164, 152, 138, 184, 207, 67, 197, 92, 217, 2, 76, 58, 94, 178, 37, 77, 104, 29, 147, 186, 213, 4, 0, 68, 50, 141, 188, 32, 100, 75, 181, 245, 152, 129, 206, 8, 26, 150, 156, 58, 64, 250, 211, 26, 227, 148, 215, 54, 211, 208, 30] c5=[237, 245, 225, 246, 128, 196, 164, 99, 116, 146, 142, 52, 178, 142, 22, 142, 145, 83, 131, 236, 95, 11, 162, 118, 70, 185, 215, 155, 24, 231, 125, 80, 181, 66, 226, 234, 116, 3, 3, 8, 238, 126, 101, 113, 79, 194, 47, 224, 78, 254, 176, 15, 66, 2, 249, 154, 233, 235, 159, 29, 47, 5, 186, 251, 28, 77, 18, 3, 158, 210, 102, 143, 10, 92, 139, 126, 160, 192, 247, 63, 246, 29, 15, 250, 168, 45, 219, 79, 53, 255, 221, 196, 174, 53, 41, 216, 229, 0, 76, 218, 117, 187, 182, 91, 162, 13, 213, 152, 39, 67, 169, 175, 140, 0, 123, 64, 127, 175, 89, 213, 103, 71, 105, 147, 99, 88, 239, 133, 137, 63, 188, 203, 11, 124, 120, 80, 224, 26, 46, 253, 192, 122, 52, 254, 102, 159, 121, 121, 223, 18, 9, 201, 145, 174, 10, 9, 142, 86, 176, 66, 6, 214, 79, 137, 249, 120, 78, 90, 157, 217, 250, 43, 95, 19, 208, 62, 177, 50, 110, 198, 133, 89, 212, 155, 216, 181, 153, 226, 252, 85, 61, 126, 91, 241, 240, 28, 202, 225, 199, 255, 203, 207, 182, 227, 144, 246, 247, 69, 112, 2, 245, 69, 237, 194, 238, 241, 15, 237, 140, 126, 186, 192, 191, 188, 72, 165, 102, 131, 194, 229, 11, 200, 67, 228, 91, 241, 176, 0, 245, 108, 198, 47, 22, 214, 221, 2, 160, 10, 42, 204, 162, 215, 64, 76, 120, 59, 201, 21, 74, 155, 214, 117, 115, 106, 36, 40, 158, 107, 22, 194, 226, 162, 169, 160, 194, 26, 220, 203, 245, 169, 56, 252, 140, 37, 161, 202, 224, 46, 66, 80, 38, 196, 69, 127, 35, 167, 77, 196, 82, 57, 101, 183, 196, 180, 129, 52, 0, 56, 47, 114, 11, 152, 226, 231, 249, 235, 223, 225, 232, 169, 56, 147, 41, 5, 57, 55, 107, 135, 234, 254, 248, 27, 34, 192, 21, 106, 11, 224, 156, 31, 0, 208, 161, 185, 254, 152, 128, 139, 116, 144, 37, 162, 126, 124, 219, 49, 59, 4, 118, 101, 174, 224, 122, 72, 252, 104, 234, 47, 140, 210, 22, 26, 154, 104, 12, 43, 238, 44, 105, 28, 147, 151, 105, 149, 60, 225, 147, 222, 162, 108, 61, 206, 101, 134, 4, 17, 248, 46, 125, 184, 83, 13, 171, 190, 110, 49, 205, 185, 126, 177, 181, 49, 45, 31, 226, 79, 37, 48, 190, 115, 136, 208, 75, 34, 68, 12, 160, 242, 206, 218, 148, 157, 32, 54, 25, 158, 135, 61, 247, 219, 178, 122, 18, 19, 56, 152, 181, 251, 162, 94, 228, 232, 88, 247, 196, 204, 139, 204, 18, 186, 159, 74, 193, 153, 87, 212, 75, 60, 220, 245, 119, 124, 191, 195, 145, 209, 107, 114, 230, 243, 235, 96, 12, 237, 78, 227, 8, 243, 251, 237, 163, 67, 188, 233, 184, 123, 25, 96, 168, 170, 231, 75, 6, 74, 214, 58, 123, 166, 134, 220, 61, 75, 161, 81, 40, 209, 37, 84, 108, 15, 203, 245, 206, 233, 177, 97, 93, 110, 157, 5, 233, 81, 35, 203, 75, 22, 49]