It sounds like you’re asking for the difference between a “plain old” function‐call (i.e. you and I agree that I’ll run your code on my machine and give you back the answer) versus a cryptographic Multi-Party Computation (MPC) protocol where no single party ever sees everyone else’s inputs.
Below is a quick table of contrasts, a few concrete toy examples, and then a bit of explanation.
Side-by-side comparison
Simple Function Call
Secure MPC Protocol
Who sees the inputs?
The callee (server/library)
Nobody (only shares or encrypted values)
Trust assumption
You trust the server to be honest and private
You assume at most t out of n parties might collude; security guaranteed by crypto
Communication
1 request → 1 response
Many rounds of interactive, cryptographic messages
The raw output only — and only if the protocol says so
Use‐cases
Web services, library calls
Privacy‐preserving auctions, joint statistics, private biometrics, etc.
Toy examples
A) Plain function call in Python
python
# Party A & B both want to compute a+b
# but in a standard function‐call model, A just sends us both numbers:
def add(a, b):
return a + b
# partyA does:
a = 17
b = 23
sum_ab = remote_server.add(a, b)
print("sum is", sum_ab) # => 40
# SERVER saw both 17 and 23 in the clear.
B) The “same” addition in (secret‐sharing–based) MPC
python
# We run an MPC protocol between two parties, A and B.
# Each party only holds a *share* of a and b.
# They exchange a few masked/encrypted messages, then reconstruct
# the result at the end, but NEVER learn each other's raw inputs.
# Pseudo‐API:
mpc.share(a) → A_share, B_share
mpc.share(b) → A_share, B_share
# Locally (no one sees the other's share!)
c_share = A_share_of_a + A_share_of_b
# Parties exchange masked c_shares and reconstruct:
sum_ab = mpc.reconstruct(c_share_from_A, c_share_from_B)
print("sum is", sum_ab) # => 40
# Neither party ever saw the other's 17 or 23!
C) Private Auction
Function‐call style:
Everyone sends all their bids to the auctioneer in the clear.
Auctioneer picks the winner.
Drawback: Auctioneer learns everyone’s bids.
MPC style:
Bidders secret‐share their bid values into shares (to two or more “servers”).
Servers run a cryptographic “max‐finding” protocol on the shares.
Only the identity (and price) of the winner is revealed; all other bids stay hidden.
Why MPC ≠ “just a function call”
Privacy/Trust.
– With a normal function call (or RPC), you give your input in the clear to whoever runs the code.
– In MPC, no single party ever sees everybody’s raw inputs. Security rests on cryptography, not on trusting a single server.
Interaction‐and‐Latency.
– RPC = you send one packet, the server computes, you get one reply.
– MPC = multiple rounds of encrypted or masked messages – often 10×–100× slower than a plain RPC.
Complexity.
– A function call is just “call site → parameter passing → run → return.”
– An MPC protocol typically involves:
• Splitting each input into shares or encrypting them
• Local “garbling” or arithmetic on shares
• Exchanging masked data
• Final reconstruction
Stronger Guarantees.
– In normal RPC, if the server is compromised or malicious, your data is out in the open.
– In MPC you get mathematical proofs (semi‐honest or malicious security) that no more information leaks than the agreed‐upon output.
——————
In practice you’d pick one or the other depending on your needs:
– If performance and simplicity matter, and you can trust the server → go with a normal function call.
– If privacy is paramount and you don’t want to trust any single node with your raw data → reach for an MPC library or framework.