commit | 19e84b21949da9428a0bda3c50275c7f348d2f96 | [log] [tgz] |
---|---|---|
author | Jungho Ahn <jhahn@google.com> | Mon May 18 13:22:27 2015 -0700 |
committer | Jungho Ahn <jhahn@google.com> | Mon May 18 13:22:30 2015 -0700 |
tree | 1eb05d01a5ec9678fe5d15490437eb6fbd6b58e2 | |
parent | 8efb2f60a992b41edf6739f6d36cc00521752a01 [diff] |
rpc/stream/vif: reuse vif auth in vc This change allows to reuse VIF authentication in VCs when the peer is the same as VIF - i.e., non-through-proxy connection. Details: o During a VIF setup, peers exchange their endpoint and save VIF authentication, which can be used in the following VCs. o During vif.Dial(), re-use the VIF authentication when - a principal given to vif.InternalNewDialedVIF() and one given to vif.Dial() are same, and - two remote endpoints are same or the given endpoint is null which means a direct connection with hostname and port - a server verifies a signature for reusing the VIF authentication that are sent from a client. o When reusing VIF auth - a dialed VC creates a new public and private key, but uses a server's public key which were exchanged during VIF setup. The VC sends the new public key to the server, but skips all authentication except running server authorizer. - a accepted VC creates a new crypter using the VIF's public and private key pair with a new public key from the client. The server doesn't send a SetupVC response and skips the authentication. RPC Setup Benchmark: (in GCE) o OLD: RPC Connection 30.27 ms/rpc o NEW: RPC Connection 14.02 ms/rpc Agent Benchmark: (in GCE) benchmark old ns/op new ns/op delta BenchmarkSignNoAgent-4 936403 932508 -0.42% BenchmarkSignCachedAgent-4 5309176 1764895 -66.76% BenchmarkSignUncachedAgent-4 5381638 1758834 -67.32% BenchmarkDefaultNoAgent-4 137 140 +2.19% BenchmarkDefaultCachedAgent-4 44.7 45.2 +1.12% BenchmarkDefaultUncachedAgent-4 7828080 3846960 -50.86% BenchmarkRecognizedNegativeNoAgent-4 34227 36651 +7.08% BenchmarkRecognizedNegativeCachedAgent-4 33353 35574 +6.66% BenchmarkRecognizedNegativeUncachedAgent-4 4291997 944295 -78.00% BenchmarkRecognizedNoAgent-4 13485 14271 +5.83% BenchmarkRecognizedCachedAgent-4 13031 13456 +3.26% BenchmarkRecognizedUncachedAgent-4 4016690 785538 -80.44% MultiPart: 2/2 Change-Id: Ida0c8f65a7b0083d8b75e59af45202c6276964d6
This repository contains a reference implementation of the Vanadium APIs.
Unlike the APIs in https://github.com/vanadium/go.v23, which promises to provide backward compatibility this repository makes no such promises.