Fully homomorphic public key encryption is the solution. We need such a crypto that hides the instructions and operands but does not alter the visible arity of instructions, and allow arithmetic operations on operands.
Preserving profitability with unchanging charter, business model, and ownership structure (including approportion of shares) is harder than maximising profit.
Legislature may overcome that hurdle by amending the Passport Act, making the Passport Card free and internationally valid federal ID document on its own. And do not say that Birth Certificate is too costly.
You should start reading The Art of Computer Programming by Donald Knuth, and solve all exercises (including ones having difficulty level 50). If you catch up finishing all currently existing volumes before Knuth finishes, with all the exercises answered thoroughly; you can consider yourself a self-taught algorithms expert.