Theoretically, If you know the hash of a program one intends to install and you generate another file that hashes to that value what could you do?

If I know the hash of a program you intend to install is d306c9f6c5…, if I generate some other file that hashes to that value, I could wreak all sorts of havoc. – from

Theoretically, If you know the hash of a program one intends to install and you generate another file that hashes to that value what could you do?

Theoretically, what if I were to change some magic numbers in, say, AES

Purerly theoretically. I know it’s a bad idea to try to invent your own encryption and that’s not the intention here. Just a thought experiment.

Say, I change some or all of the magic numbers used in, say, AES (but this would could also apply to other algorithms) and create “AES-RobIII”. Ofcourse this would be incompatible with the current AES algorithm.

  1. First: I know these numbers are chosen (usually) very carefully (sometimes maybe even crafted so that they can contain a secret backdoor, but I’m not interested in conspiracy theories etc). How are these numbers chosen generally and I assume there are many (‘infinite’) variations possible? Do they come from a ‘RNG’ (tuned to some specific rules)? Are they chosen ‘manually’? I know they have to satisfy some polynomial(s) but do they (the cryptographers designing the algorithm) just start with a random seed or pick a specific number or…?
  2. Since these magic numbers are, along with the algorithm, out in the open (as any good encryption algorithm should be), I could theoretically pad the encrypted message with them and ‘load’ these tables with the numbers before the algorithm is kicked off to encrypt/decrypt, right?
  3. Then why have these numbers as constants in the algorithm (unless size is a priority ofcourse) in the first place? Or why don’t we have, say, AES-I, AES-II and AES-III with the only difference being another set of magic numbers? You could even consider the table(s) of magic numbers used a sort of “extra key” so, say, a company could use their generated (similar to how private/public keypairs are generated for example) set of numbers internally for extra added security when stuff would leak. I realise it won’t add much (if anything at all) but added complexity but I was just wondering.

Again, I realise this won’t add any advantage of any meaning (probably), if at all, but I was just wondering. Also this question is based on the assumption that if I change any of the magic numbers and encrypt something with it and then try to decrypt it (with the same, altered, magic numbers) it would still decrypt correctly.

How can Turing complete machines exist theoretically if the halting problem is undecidable

As the question says, if I input on the tape of a Turing complete machine a program that solves the halting problem with the correct inputs the program will never end its execution regardless of memory and time. Isn’t the halting problem a computational problem that can’t be executed by a Turing complete machine so that it’s halts sometime?

Is it theoretically possible to dynamically grow array size in stack memory?

I was wondering, given the usual stack memory functioning, whether it is possible for an array like primitive type allowed to grow in size to exist.
The functioning of such primitive type is as follows.

  • Any one function is allowed to have only one such primitive variable.
  • Appending to such primitive variable is allowed only within the function that it was initialized in.
  • If the function that such primitive variable was initialize in is not the last in the stack, such primitive variable is not allowed to grow in size.

enter image description here

I was wondering whether:

  • Such primitive type is theoretically possible.
  • Whether it is something that is already in use.

Would it be theoretically possible to do a block-level backup of /dev/media without root?

I have nothing against root except eFUSE. Whose ever idea eFUSE was . . .

As far as I understand:
Because of amateur users and clueless minimalists who don’t know how to utilise tools that are intended for power users, the development team of TWRP has controversially decided that their NANDROID backup does not include /data/media.

More information and sources in these comments:
1. Best practice for backing up /data/media?
2. Best practice for backing up /data/media?

What I want is a block-level image backup of the entire phone, so that I can return to the exact spot later on.

I want that block-level backup to include the /data/media partition.

Now, I have found out it is possible via ADB, but that requires root. If there is really no other way, I would consider taking the risk of rooting the phone after doing any other possible backup method (adb app backup, file backup, etc.)

But my question is:

Is it technically possible to do a block-level (dd) backup of the /data/media partition without root?

Had the developement team of TWRP decided to include /data/media, pleasing power users and maximalists instead of minimalists and amateur users, would it actually have been possible without root?

Could a transaction hex on testnet theoretically be valid on mainnet?

For all practical intents and purposes it seems a testnet tx hex could never be valid on mainnet because of the prev tx hex present for all inputs used in the tx. However, let’s say that by some miracle you had identical unspents on both testnet and mainnet. If you signed the tx and broadcast it to testnet, could you then broadcast the same tx hex to the mainnet? In other words, is there anything network specific in the tx hex? I thought there was some network magic that might go into either the signature hash or the script hash but it does not seem to be the case as far as I can tell.