Skip to main content
Filter by
Sorted by
Tagged with
1 vote
1 answer
138 views

I am doing a case study on Mirai, and I am stuck on the XOR encryption/decryption. From the source code, I copied the toggle_obf function and I tried several ways to reverse the "\x22\x35" ...
Ant's user avatar
  • 13
1 vote
0 answers
30 views

I’m trying to implement a threshold-logic (step-activation) network in C++ that computes a 5‑input XOR function. There is no training whatsoever. I already have working code for a 3‑input XOR, but ...
Josh C.'s user avatar
  • 11
1 vote
0 answers
34 views

I'm working on coding up a neural network from scratch into js, and have implemented the following: class Network{ constructor(layerSizes, activation){ this.activation = activation[0] this....
R. Reed's user avatar
  • 146
2 votes
1 answer
88 views

Consider two boolean arrays import numpy as np A = np.asarray([[True, False], [False, False]]) B = np.asarray([[False, True], [True, True]]) I want to take the ...
Ben's user avatar
  • 539
0 votes
1 answer
71 views

Is there a potential issue with z3 solver library. Sprecifically on Xor operator? Running the following code in python would return 'unsat' while I believe the answer should be sat. Is this a ...
Jinhong Huo's user avatar
1 vote
0 answers
90 views

I'm using ProVerif 2.05 for modeling cryptographic protocols, but I'm running into errors when performing bitwise operations with the XOR function. The error tells me that I have a type mismatch when ...
kw33n's user avatar
  • 11
-1 votes
1 answer
119 views

#include <bitset> #include <iostream> int main() { std::bitset<8> a = 10101010; std::bitset<8> b = 11111111; std::cout << (a ^ b); } When running the ...
mega_coder's user avatar
-3 votes
1 answer
76 views

I've managed to isolate (what I perceive to be) a strange relationship between lists of bitarrays and the XOR operation in Python. Here is my minimal example: ls = [bitarray('0'), bitarray('0')] ls[0] ...
Nathan Lowry's user avatar
0 votes
1 answer
43 views

Some instructions with corresponding opcodes: xor eax, eax \x31\xc0 xor ecx, ecx \x31\xc9 xor edx, edx \x31\xd2 xor ebx, ebx \x31\xdb Could someone please explain the calculation ...
rdre8's user avatar
  • 49
2 votes
1 answer
108 views

So I've been exploring the 12 chapter in the picoCTF primer and suddenly saw difference in my assembly of the program and the picoCTF's in the end of main function, where the stack canary is being ...
digitale's user avatar
0 votes
1 answer
111 views

I wanted to solve this problem: C. Vampiric Powers, anyone?, Codeforces In short, there is sequence a, and infinitely times we can find XOR of any subset and append the XOR of this subset to the end ...
Szyszka947's user avatar
  • 1,058
2 votes
2 answers
198 views

Starting with array of N positive integers, support Q queries. Each query contains a positive integer i. To answer the query, replace each element of the array with the result of xoring it with i, ...
user25680598's user avatar
-1 votes
1 answer
247 views

I saw a neat way to swap 2 variables using XOR lately and decided to try that in c# with strings, and though I managed to do that I'm a little worried that I have to cast int into byte after the XOR ...
LemosLover's user avatar
3 votes
2 answers
218 views

In the example below, the two XORed bars do not completely cancel out when perfectly aligned. You can see their outline. How to make the outline disappear, which is what a correct XOR should do? ....
GirkovArpa's user avatar
  • 5,101
1 vote
1 answer
68 views

How to get difference between 2 pandas dataframes (symmetric difference)? import pandas as pd a = pd.DataFrame({'a': [1, 2], 'b': ['x', 'y']}) b = pd.DataFrame({'a': [1, 2, 3], 'b': ['x', 'z', '']}) ...
aeiou's user avatar
  • 447
0 votes
1 answer
76 views

I'm likely doing something very stupid and I'm having quite a bit of trouble understanding how these results could possibly be generated. Over a web socket from a browser to a local Tcl script, the ...
Gary's user avatar
  • 3,226
1 vote
2 answers
217 views

Given array of N real numbers x_1, x_2, ..., x_n, check if there exists 1 <= i,j,k <= n such that x_i ⊕ x_j ⊕ x_k = 0, where ⊕ is XOR operation. This is college homework and it has to be done in ...
mafju's user avatar
  • 21
0 votes
0 answers
157 views

I've written code to perform character frequency analysis on strings by taking the standard ETAOIN SRHD... frequencies of english character occurrence and I have two questions. Is this the most ...
Austin Wile's user avatar
1 vote
5 answers
800 views

So I got a coding problem, the the program asks me to negate every bit of a binary, for example, the regular bitwise negation will be like this: ten = 00001010 the negation is 11110101 = 245, well to ...
penguinn's user avatar
0 votes
1 answer
308 views

I am trying a simple XOR encryption in C/C++ for Windows. To achieve this I am using a key "SECRETKEY" and a character array "payload". If at some point the value of current key ...
Athylus's user avatar
  • 191
1 vote
1 answer
118 views

In OWL I want to formulate the case where for a certain class only one or the other subclass is allowed. I want to model a restriction that allows for a property to be only linked like (A XOR B) OR (...
Daraan's user avatar
  • 5,166
0 votes
1 answer
73 views

If I have a 2d numpy array like (the data is not necessarily sequential but for example) [[0. 1. 2. 3.] [4. 5. 6. 7.] [8. 9. 10. 11.]] how can I compute 0^1^2^3^4^5^6^7^8^9^10? I think I could ...
AnthonyML's user avatar
-3 votes
2 answers
153 views

Which of the following options can achieve a swapping effect for pair (*, *)? Note that ^ represents XOR operation. For binary numbers, 0 XOR 0 = 0, 0 XOR 1 = 1, 1 XOR 0 = 1, 1 XOR 1 = 0. A. (x, y): x ...
Ader's user avatar
  • 21
2 votes
3 answers
180 views

I am trying to create an One Time Pad for cryptography, But I am stuck in an error The plan is Generate Text Generate Key Convert text and key from Ascii to binary Create Cipher using Key_binary XOR ...
texonec238's user avatar
0 votes
1 answer
116 views

A function computes the XOR sum of binary numbers. The numbers come from a finite set of "n" constants, whose values are fixed and known (without repeats). The function is passed a subset ...
opua's user avatar
  • 1
0 votes
0 answers
249 views

I'm working on a CUDA program where ALU is fully utilized (almost 100% compute throughput). The program does a lot of XOR operations, among others. Is it possible to offload the XOR to the floating-...
Serge Rogatch's user avatar
0 votes
1 answer
259 views

I recently asked a question about embedding data into an image. I promptly solved that issue with help from other forums. I have run into a new problem: my program works fine for all Latin characters ...
user avatar
0 votes
1 answer
30 views

I found an interesting phenomenon, when I try to do symmetric encryption (Bit-wise XOR execution) for a figure with another random figure. The execution time is different between encryption and ...
Nigel HU's user avatar
3 votes
2 answers
257 views

I want to xor large shifted arrays, following is portable version of that function for easy of explanation. How I can improve this computation? I have tried using AVX2 but didnt see much improvement. ...
CryptoKitty's user avatar
1 vote
1 answer
80 views

I need to implement a Neural Network with only numpy, which gets two inputs, has one hidden layer, which uses ReLU as activation function, and one ouput layer, which uses sigmoid as activation. The ...
Felix's user avatar
  • 41
1 vote
1 answer
616 views

the expected output of my code is "IA0aB1QMAFQVRQARFxcWAFQIFgcHBBQRWg==" however it is actually outputting <<<<<<<<<<<<<<<<<<<<<...
Crimson's user avatar
  • 155
1 vote
1 answer
189 views

I'm struggling with the LeetCode task: Decode XORed Permutation There is an integer array perm that is a permutation of the first n positive integers, where n is always odd. It was encoded into ...
Szyszka947's user avatar
  • 1,058
0 votes
1 answer
88 views

I have the below console application to check the time taken for doing a specific operation with BigInteger in C#. using System.Diagnostics; using System.Numerics; Stopwatch timer = new Stopwatch(); ...
Azeeb's user avatar
  • 91
1 vote
0 answers
31 views

I have trouble to understand what is wrong with my code, maybe I didn't understand how the backpropagation works. Can I get some hints ? import numpy as np import matplotlib.pyplot as plt def sigmoide(...
ChevreFou's user avatar
-1 votes
1 answer
41 views

I'm trying to write simple 2 output XOR Neural Network in Python with no hidden layers. I have weight matrix of size (3,2). Because I have two outputs when learning I'm counting two separate errors: ...
Karolina Olszewska's user avatar
0 votes
1 answer
1k views

Given an array of integers, find the number of subarray which has length at least 3 where the bitwise XOR of first and last element in the subarray is equal to rest of the elements in the subarray. ...
Jianing Li's user avatar
-1 votes
4 answers
460 views

I'm having trouble writing a bitwise XNOR function with at most 7 ~ and | operators. Example: bitXnor(6, -5) = 2. How do I do this without &? So far I have this: int bitXnor(int x, int y) { ...
jess's user avatar
  • 43
0 votes
1 answer
63 views

I am writing a simple script encrypting files with XOR, and I noticed that if there are zero bytes in a file block, the key is present in the encrypted block in plaintext. For me this is unacceptable, ...
rootkit.sys's user avatar
0 votes
1 answer
87 views

I am trying to define a hash for a sorted vector of type size_t. As part of the solution, I use an XOR operation. cdef size_t vector_hash(const vector[size_t]& v) noexcept nogil: ""&...
ajl123's user avatar
  • 1,302
4 votes
1 answer
487 views

I'm stuck on this one problem from a competitive programming archive which says: Given an array of integers A of length n, we need to find the minimum length subarray such that it has a subsequence ...
astro's user avatar
  • 51
0 votes
2 answers
161 views

i was trying to make a program to blink a RPI3 b+ with Armv7 Assembly and notice that it wasn't working using this code for the delay function delay: b loop loop: add r10, r10, #1 cmp r10,...
jack07Code's user avatar
0 votes
1 answer
568 views

I'm currently using this code to make a small example of AES mix_columns_matrix = [ [0x2, 0x3, 0x1, 0x1], [0x1, 0x2, 0x3, 0x1], [0x1, 0x1, 0x2, 0x3], [0x3, 0x1, 0x1, 0x2] ] def ...
ELUCIDE's user avatar
1 vote
1 answer
102 views

I am attempting to have the address of a function be stored in a xor'ed form in memory similar to the XorStr function that is widely used for strings which just takes a string. Stores it in a semi-...
YoAvrageBiTz's user avatar
0 votes
1 answer
215 views

The question is; how to calculate (x * a) XOR (x *b) XOR (x *c)? Definitions are; x, a, b, c are all large hexadecimal numbers known by default. Solutions are; to calculate x*a, x*b, x*c and then ...
HabibS's user avatar
  • 382
1 vote
0 answers
63 views

This Python code is a simple script that encrypts a shellcode using XOR with a secret key, creates a decoder stub in assembly language, assembles the decoder stub, and then compiles it into a Windows ...
the man 's user avatar
-2 votes
1 answer
106 views

#include <iostream> #include <vector> using namespace std; int main() { vector<int> input = {2,3,4,5,4,3,7,2}; int XOR = 0; for (auto& i : input) { XOR = ...
Nick Kamal's user avatar
1 vote
2 answers
82 views

I am using a double strength XOR encryption to encrypt a bytearray of an image and than rewrite the array into the image file. When I use small numbers for the encryption keys this works great and the ...
Tyson_Codes's user avatar
2 votes
1 answer
324 views

I have 2 switches that correspond to 2 lights and I would like to control them with logic gates. My problem starts when a switch is ON and the second one goes into ON as well. In this condition, I ...
Thanasis Valto Kourpetis's user avatar
0 votes
1 answer
86 views

I am practicing my C file handling knowledge by coding a program that encrypts-decrypts a file by a given path. The problem is that my program is encrypting the file but never decrypt it. I will share ...
Zerocool_m12's user avatar
7 votes
1 answer
422 views

for some reason long to explain I want to do the following bitwise operations in perl: (let's assume that 1 means true and 0 means false) $var1="11000001"; $var2="10000101"; $y=$...
salonso's user avatar
  • 71

1
2 3 4 5
33