diff --git a/Assets/Mirror/Transports/Encryption/EncryptedConnection.cs b/Assets/Mirror/Transports/Encryption/EncryptedConnection.cs index d70a985bd..e37488fca 100644 --- a/Assets/Mirror/Transports/Encryption/EncryptedConnection.cs +++ b/Assets/Mirror/Transports/Encryption/EncryptedConnection.cs @@ -1,5 +1,6 @@ using System; using System.Security.Cryptography; +using Mirror.Transports.Encryption.Native; using System.Text; using Org.BouncyCastle.Crypto; using Org.BouncyCastle.Crypto.Agreement; @@ -131,6 +132,7 @@ enum State * The client does this, since the fin is not acked explicitly, but by receiving data to decrypt */ private readonly bool _sendsFirst; + private byte[] _keyRaw; public EncryptedConnection(EncryptionCredentials credentials, bool isClient, @@ -363,6 +365,18 @@ private ArraySegment Encrypt(ArraySegment plaintext) #endif // Resize the static buffer to fit EnsureSize(ref _tmpCryptBuffer, outSize); + + if (AesGCMEncryptionNative.IsSupported) + { + ArraySegment nativeRes = AesGCMEncryptionNative.Encrypt(_keyRaw, _nonce, plaintext, new ArraySegment(_tmpCryptBuffer)); + if (nativeRes.Count == 0) + { + _error(TransportError.Unexpected, $"Native Encryption failed. Please check STDERR (or editor log) for the error."); + return new ArraySegment(); + } + return nativeRes; + } + int resultLen; try { @@ -411,6 +425,16 @@ private ArraySegment Decrypt(ArraySegment ciphertext) #endif // Resize the static buffer to fit EnsureSize(ref _tmpCryptBuffer, outSize); + if (AesGCMEncryptionNative.IsSupported) + { + var nativeRes = AesGCMEncryptionNative.Decrypt(_keyRaw, ReceiveNonce, ciphertext, new ArraySegment(_tmpCryptBuffer)); + if (nativeRes.Count == 0) + { + _error(TransportError.Unexpected, $"Native Encryption failed. Please check STDERR (or editor log) for the error."); + return new ArraySegment(); + } + return nativeRes; + } int resultLen; try { @@ -537,12 +561,12 @@ private void CompleteExchange(ArraySegment remotePubKeyRaw, byte[] salt) Hkdf.Init(new HkdfParameters(sharedSecret, salt, HkdfInfo)); // Allocate a buffer for the output key - byte[] keyRaw = new byte[KeyLength]; + _keyRaw = new byte[KeyLength]; // Generate the output keying material - Hkdf.GenerateBytes(keyRaw, 0, keyRaw.Length); + Hkdf.GenerateBytes(_keyRaw, 0, _keyRaw.Length); - KeyParameter key = new KeyParameter(keyRaw); + KeyParameter key = new KeyParameter(_keyRaw); // generate a starting nonce _nonce = GenerateSecureBytes(NonceSize); diff --git a/Assets/Mirror/Transports/Encryption/EncryptionTransport.cs b/Assets/Mirror/Transports/Encryption/EncryptionTransport.cs index 5d9d9bb9a..ee7599add 100644 --- a/Assets/Mirror/Transports/Encryption/EncryptionTransport.cs +++ b/Assets/Mirror/Transports/Encryption/EncryptionTransport.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using Mirror.Transports.Encryption.Native; using UnityEngine; using UnityEngine.Profiling; using UnityEngine.Serialization; @@ -38,6 +39,11 @@ public enum ValidationMode public string EncryptionPublicKeyFingerprint => _credentials?.PublicKeyFingerprint; public byte[] EncryptionPublicKey => _credentials?.PublicKeySerialized; + + public override string ToString() + { + return $"EncryptionTransport(native: {AesGCMEncryptionNative.IsSupported})"; + } private void ServerRemoveFromPending(EncryptedConnection con) { for (int i = 0; i < _serverPendingConnections.Count; i++) diff --git a/Assets/Mirror/Transports/Encryption/Native.meta b/Assets/Mirror/Transports/Encryption/Native.meta new file mode 100644 index 000000000..dbac4c8a4 --- /dev/null +++ b/Assets/Mirror/Transports/Encryption/Native.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: f4ce017555fd48b7974abd511fd855c1 +timeCreated: 1708980635 \ No newline at end of file diff --git a/Assets/Mirror/Transports/Encryption/Native/AesGCMEncryptionNative.cs b/Assets/Mirror/Transports/Encryption/Native/AesGCMEncryptionNative.cs new file mode 100644 index 000000000..923849585 --- /dev/null +++ b/Assets/Mirror/Transports/Encryption/Native/AesGCMEncryptionNative.cs @@ -0,0 +1,81 @@ +using System; +using System.Runtime.InteropServices; +using System.Security; +using UnityEngine; +namespace Mirror.Transports.Encryption.Native +{ + public class AesGCMEncryptionNative + { + [SuppressUnmanagedCodeSecurity] + [DllImport("rusty_mirror_encryption", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)] + private static extern byte is_supported(); + + [SuppressUnmanagedCodeSecurity] + [DllImport("rusty_mirror_encryption", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)] + private static extern uint aes_gcm_encrypt( + UIntPtr key, uint key_size, + UIntPtr nonce, uint nonce_size, + UIntPtr data, uint data_in_size, uint data_capacity); + + [SuppressUnmanagedCodeSecurity] + [DllImport("rusty_mirror_encryption", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)] + private static extern uint aes_gcm_decrypt( + UIntPtr key, uint key_size, + UIntPtr nonce, uint nonce_size, + UIntPtr data, uint data_size); + + private static bool _supported; + static AesGCMEncryptionNative() + { + try + { + _supported = is_supported() == 1; + } + catch (Exception e) + { + // TODO: silent? + Debug.LogWarning($"Native AES GCM is not supported: {e}"); + } + } + public static bool IsSupported => _supported; + public static unsafe ArraySegment Encrypt(byte[] key, byte[] nonce, ArraySegment plaintext, ArraySegment dataOut) + { + Array.Copy(plaintext.Array, plaintext.Offset, dataOut.Array, dataOut.Offset ,plaintext.Count); + fixed (byte* keyPtr = key) + { + fixed (byte* noncePtr = nonce) + { + fixed (byte* dataPtr = dataOut.Array) + { + UIntPtr data = ((UIntPtr)dataPtr) + dataOut.Offset; + uint resultLength = aes_gcm_encrypt( + (UIntPtr)keyPtr, (uint)key.Length, + (UIntPtr)noncePtr, (uint)nonce.Length, + data, (uint)plaintext.Count, (uint)dataOut.Count); + return new ArraySegment(dataOut.Array, dataOut.Offset, (int)resultLength); + } + } + } + } + + public static unsafe ArraySegment Decrypt(byte[] key, byte[] nonce, ArraySegment ciphertext, ArraySegment dataOut) + { + Array.Copy(ciphertext.Array, ciphertext.Offset, dataOut.Array, dataOut.Offset, ciphertext.Count); + fixed (byte* keyPtr = key) + { + fixed (byte* noncePtr = nonce) + { + fixed (byte* dataPtr = dataOut.Array) + { + UIntPtr data = ((UIntPtr)dataPtr) + dataOut.Offset; + uint resultLength = aes_gcm_decrypt( + (UIntPtr)keyPtr, (uint)key.Length, + (UIntPtr)noncePtr, (uint)nonce.Length, + data, (uint)ciphertext.Count); + return new ArraySegment(dataOut.Array, dataOut.Offset, (int)resultLength); + } + } + } + } + } +} diff --git a/Assets/Mirror/Transports/Encryption/Native/AesGCMEncryptionNative.cs.meta b/Assets/Mirror/Transports/Encryption/Native/AesGCMEncryptionNative.cs.meta new file mode 100644 index 000000000..550eb58fa --- /dev/null +++ b/Assets/Mirror/Transports/Encryption/Native/AesGCMEncryptionNative.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 62ce567e6de54179a7e71c6173c07074 +timeCreated: 1708980733 \ No newline at end of file diff --git a/Assets/Mirror/Transports/Encryption/Native/LICENSE b/Assets/Mirror/Transports/Encryption/Native/LICENSE new file mode 100644 index 000000000..c737e6316 --- /dev/null +++ b/Assets/Mirror/Transports/Encryption/Native/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 Robin Rolf + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/Assets/Mirror/Transports/Encryption/Native/LICENSE.meta b/Assets/Mirror/Transports/Encryption/Native/LICENSE.meta new file mode 100644 index 000000000..f2404dac3 --- /dev/null +++ b/Assets/Mirror/Transports/Encryption/Native/LICENSE.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 3b3ffcf9d4944ce1ba77dc8853552169 +timeCreated: 1708988561 \ No newline at end of file diff --git a/Assets/Mirror/Transports/Encryption/Native/README.md b/Assets/Mirror/Transports/Encryption/Native/README.md new file mode 100644 index 000000000..1220c0412 --- /dev/null +++ b/Assets/Mirror/Transports/Encryption/Native/README.md @@ -0,0 +1,4 @@ +# [RustyMirrorEncryption](https://github.com/imerr/RustyMirrorEncryption) +A tiny native library for hardware accelerated AES-GCM encryption and decryption for the EncryptionTransport in [Mirror](https://github.com/MirrorNetworking/Mirror) + +Uses [RustCryptos aes_gcm crate](https://github.com/RustCrypto/AEADs/tree/master/aes-gcm) crate diff --git a/Assets/Mirror/Transports/Encryption/Native/README.md.meta b/Assets/Mirror/Transports/Encryption/Native/README.md.meta new file mode 100644 index 000000000..d95afc7e7 --- /dev/null +++ b/Assets/Mirror/Transports/Encryption/Native/README.md.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 1d335f0e47b24038886233a1c8622cd3 +timeCreated: 1708988530 \ No newline at end of file diff --git a/Assets/Mirror/Transports/Encryption/Native/aarch64-apple-darwin.meta b/Assets/Mirror/Transports/Encryption/Native/aarch64-apple-darwin.meta new file mode 100644 index 000000000..6bd08b6f6 --- /dev/null +++ b/Assets/Mirror/Transports/Encryption/Native/aarch64-apple-darwin.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b590fe1f91b89f7429f7718e41d5c627 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Mirror/Transports/Encryption/Native/aarch64-apple-darwin/librusty_mirror_encryption.dylib b/Assets/Mirror/Transports/Encryption/Native/aarch64-apple-darwin/librusty_mirror_encryption.dylib new file mode 100644 index 000000000..faa3a69a7 Binary files /dev/null and b/Assets/Mirror/Transports/Encryption/Native/aarch64-apple-darwin/librusty_mirror_encryption.dylib differ diff --git a/Assets/Mirror/Transports/Encryption/Native/aarch64-apple-darwin/librusty_mirror_encryption.dylib.meta b/Assets/Mirror/Transports/Encryption/Native/aarch64-apple-darwin/librusty_mirror_encryption.dylib.meta new file mode 100644 index 000000000..1a75580dc --- /dev/null +++ b/Assets/Mirror/Transports/Encryption/Native/aarch64-apple-darwin/librusty_mirror_encryption.dylib.meta @@ -0,0 +1,63 @@ +fileFormatVersion: 2 +guid: b76b42eea65583d48a419394df29a98f +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + : Any + second: + enabled: 0 + settings: + Exclude Editor: 0 + Exclude Linux64: 1 + Exclude OSXUniversal: 0 + Exclude Win: 1 + Exclude Win64: 1 + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + Editor: Editor + second: + enabled: 1 + settings: + CPU: AnyCPU + DefaultValueInitialized: true + OS: AnyOS + - first: + Standalone: Linux64 + second: + enabled: 0 + settings: + CPU: x86_64 + - first: + Standalone: OSXUniversal + second: + enabled: 1 + settings: + CPU: ARM64 + - first: + Standalone: Win + second: + enabled: 0 + settings: + CPU: x86 + - first: + Standalone: Win64 + second: + enabled: 0 + settings: + CPU: x86_64 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Mirror/Transports/Encryption/Native/aarch64-apple-ios.meta b/Assets/Mirror/Transports/Encryption/Native/aarch64-apple-ios.meta new file mode 100644 index 000000000..549dfc36f --- /dev/null +++ b/Assets/Mirror/Transports/Encryption/Native/aarch64-apple-ios.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 52afa74b55d70ff4b944c270cded1621 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Mirror/Transports/Encryption/Native/aarch64-apple-ios/librusty_mirror_encryption.dylib b/Assets/Mirror/Transports/Encryption/Native/aarch64-apple-ios/librusty_mirror_encryption.dylib new file mode 100644 index 000000000..9cdecc7e0 Binary files /dev/null and b/Assets/Mirror/Transports/Encryption/Native/aarch64-apple-ios/librusty_mirror_encryption.dylib differ diff --git a/Assets/Mirror/Transports/Encryption/Native/aarch64-apple-ios/librusty_mirror_encryption.dylib.meta b/Assets/Mirror/Transports/Encryption/Native/aarch64-apple-ios/librusty_mirror_encryption.dylib.meta new file mode 100644 index 000000000..4b3259a95 --- /dev/null +++ b/Assets/Mirror/Transports/Encryption/Native/aarch64-apple-ios/librusty_mirror_encryption.dylib.meta @@ -0,0 +1,33 @@ +fileFormatVersion: 2 +guid: 2549b603494fff7469d56bda37b69109 +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + Editor: Editor + second: + enabled: 1 + settings: + DefaultValueInitialized: true + - first: + Standalone: OSXUniversal + second: + enabled: 1 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Mirror/Transports/Encryption/Native/aarch64-linux-android.meta b/Assets/Mirror/Transports/Encryption/Native/aarch64-linux-android.meta new file mode 100644 index 000000000..6fcb7a2d1 --- /dev/null +++ b/Assets/Mirror/Transports/Encryption/Native/aarch64-linux-android.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 12721f4888703aa46b3d1ccf95574933 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Mirror/Transports/Encryption/Native/aarch64-linux-android/librusty_mirror_encryption.so b/Assets/Mirror/Transports/Encryption/Native/aarch64-linux-android/librusty_mirror_encryption.so new file mode 100644 index 000000000..1a6db55a0 Binary files /dev/null and b/Assets/Mirror/Transports/Encryption/Native/aarch64-linux-android/librusty_mirror_encryption.so differ diff --git a/Assets/Mirror/Transports/Encryption/Native/aarch64-linux-android/librusty_mirror_encryption.so.meta b/Assets/Mirror/Transports/Encryption/Native/aarch64-linux-android/librusty_mirror_encryption.so.meta new file mode 100644 index 000000000..2f5eb25ed --- /dev/null +++ b/Assets/Mirror/Transports/Encryption/Native/aarch64-linux-android/librusty_mirror_encryption.so.meta @@ -0,0 +1,27 @@ +fileFormatVersion: 2 +guid: 27733f6020cceb14c8f496b32d0e7fbd +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + Any: + second: + enabled: 1 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Mirror/Transports/Encryption/Native/aarch64-unknown-linux-gnu.meta b/Assets/Mirror/Transports/Encryption/Native/aarch64-unknown-linux-gnu.meta new file mode 100644 index 000000000..b402e7bd3 --- /dev/null +++ b/Assets/Mirror/Transports/Encryption/Native/aarch64-unknown-linux-gnu.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ab9fb4d0e4db8104ca0b081fdb5ed39b +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Mirror/Transports/Encryption/Native/aarch64-unknown-linux-gnu/librusty_mirror_encryption.so b/Assets/Mirror/Transports/Encryption/Native/aarch64-unknown-linux-gnu/librusty_mirror_encryption.so new file mode 100644 index 000000000..c710c3ff0 Binary files /dev/null and b/Assets/Mirror/Transports/Encryption/Native/aarch64-unknown-linux-gnu/librusty_mirror_encryption.so differ diff --git a/Assets/Mirror/Transports/Encryption/Native/aarch64-unknown-linux-gnu/librusty_mirror_encryption.so.meta b/Assets/Mirror/Transports/Encryption/Native/aarch64-unknown-linux-gnu/librusty_mirror_encryption.so.meta new file mode 100644 index 000000000..db24004d1 --- /dev/null +++ b/Assets/Mirror/Transports/Encryption/Native/aarch64-unknown-linux-gnu/librusty_mirror_encryption.so.meta @@ -0,0 +1,27 @@ +fileFormatVersion: 2 +guid: 8b444b5607bfebe45b55f3738101e467 +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + Any: + second: + enabled: 1 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Mirror/Transports/Encryption/Native/armv7-linux-androideabi.meta b/Assets/Mirror/Transports/Encryption/Native/armv7-linux-androideabi.meta new file mode 100644 index 000000000..81a9e6a08 --- /dev/null +++ b/Assets/Mirror/Transports/Encryption/Native/armv7-linux-androideabi.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f8232f87006729a4097558e850130da4 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Mirror/Transports/Encryption/Native/armv7-linux-androideabi/librusty_mirror_encryption.so b/Assets/Mirror/Transports/Encryption/Native/armv7-linux-androideabi/librusty_mirror_encryption.so new file mode 100644 index 000000000..0435f0bfd Binary files /dev/null and b/Assets/Mirror/Transports/Encryption/Native/armv7-linux-androideabi/librusty_mirror_encryption.so differ diff --git a/Assets/Mirror/Transports/Encryption/Native/armv7-linux-androideabi/librusty_mirror_encryption.so.meta b/Assets/Mirror/Transports/Encryption/Native/armv7-linux-androideabi/librusty_mirror_encryption.so.meta new file mode 100644 index 000000000..02efafd63 --- /dev/null +++ b/Assets/Mirror/Transports/Encryption/Native/armv7-linux-androideabi/librusty_mirror_encryption.so.meta @@ -0,0 +1,27 @@ +fileFormatVersion: 2 +guid: b49434d36bc0ad54db4779b5d09edb63 +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + Any: + second: + enabled: 1 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Mirror/Transports/Encryption/Native/i686-pc-windows-msvc.meta b/Assets/Mirror/Transports/Encryption/Native/i686-pc-windows-msvc.meta new file mode 100644 index 000000000..896077651 --- /dev/null +++ b/Assets/Mirror/Transports/Encryption/Native/i686-pc-windows-msvc.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: cfeeb87517fcd8d43a1e82b9b2bc0ede +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Mirror/Transports/Encryption/Native/i686-pc-windows-msvc/rusty_mirror_encryption.dll b/Assets/Mirror/Transports/Encryption/Native/i686-pc-windows-msvc/rusty_mirror_encryption.dll new file mode 100644 index 000000000..bb35db563 Binary files /dev/null and b/Assets/Mirror/Transports/Encryption/Native/i686-pc-windows-msvc/rusty_mirror_encryption.dll differ diff --git a/Assets/Mirror/Transports/Encryption/Native/i686-pc-windows-msvc/rusty_mirror_encryption.dll.meta b/Assets/Mirror/Transports/Encryption/Native/i686-pc-windows-msvc/rusty_mirror_encryption.dll.meta new file mode 100644 index 000000000..b5736a6f6 --- /dev/null +++ b/Assets/Mirror/Transports/Encryption/Native/i686-pc-windows-msvc/rusty_mirror_encryption.dll.meta @@ -0,0 +1,63 @@ +fileFormatVersion: 2 +guid: f52c61e71c4975e46810869fc35f9bae +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + : Any + second: + enabled: 0 + settings: + Exclude Editor: 1 + Exclude Linux64: 0 + Exclude OSXUniversal: 0 + Exclude Win: 0 + Exclude Win64: 1 + - first: + Any: + second: + enabled: 1 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + CPU: AnyCPU + DefaultValueInitialized: true + OS: AnyOS + - first: + Standalone: Linux64 + second: + enabled: 1 + settings: + CPU: AnyCPU + - first: + Standalone: OSXUniversal + second: + enabled: 1 + settings: + CPU: None + - first: + Standalone: Win + second: + enabled: 1 + settings: + CPU: x86 + - first: + Standalone: Win64 + second: + enabled: 0 + settings: + CPU: None + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Mirror/Transports/Encryption/Native/i686-unknown-linux-gnu.meta b/Assets/Mirror/Transports/Encryption/Native/i686-unknown-linux-gnu.meta new file mode 100644 index 000000000..144991dc1 --- /dev/null +++ b/Assets/Mirror/Transports/Encryption/Native/i686-unknown-linux-gnu.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: de0f8585ba061a54aa46ada04c1eb8ea +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Mirror/Transports/Encryption/Native/i686-unknown-linux-gnu/librusty_mirror_encryption.so b/Assets/Mirror/Transports/Encryption/Native/i686-unknown-linux-gnu/librusty_mirror_encryption.so new file mode 100644 index 000000000..5e78220bd Binary files /dev/null and b/Assets/Mirror/Transports/Encryption/Native/i686-unknown-linux-gnu/librusty_mirror_encryption.so differ diff --git a/Assets/Mirror/Transports/Encryption/Native/i686-unknown-linux-gnu/librusty_mirror_encryption.so.meta b/Assets/Mirror/Transports/Encryption/Native/i686-unknown-linux-gnu/librusty_mirror_encryption.so.meta new file mode 100644 index 000000000..5fc5127d7 --- /dev/null +++ b/Assets/Mirror/Transports/Encryption/Native/i686-unknown-linux-gnu/librusty_mirror_encryption.so.meta @@ -0,0 +1,27 @@ +fileFormatVersion: 2 +guid: 46bfc9351689e844cad51ad69f5e4827 +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + Any: + second: + enabled: 1 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Mirror/Transports/Encryption/Native/x86_64-apple-darwin.meta b/Assets/Mirror/Transports/Encryption/Native/x86_64-apple-darwin.meta new file mode 100644 index 000000000..f8c9bb278 --- /dev/null +++ b/Assets/Mirror/Transports/Encryption/Native/x86_64-apple-darwin.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a4280b4d4efd76e4cbc4e3cf208c350e +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Mirror/Transports/Encryption/Native/x86_64-apple-darwin/librusty_mirror_encryption.dylib b/Assets/Mirror/Transports/Encryption/Native/x86_64-apple-darwin/librusty_mirror_encryption.dylib new file mode 100644 index 000000000..5e26cf98f Binary files /dev/null and b/Assets/Mirror/Transports/Encryption/Native/x86_64-apple-darwin/librusty_mirror_encryption.dylib differ diff --git a/Assets/Mirror/Transports/Encryption/Native/x86_64-apple-darwin/librusty_mirror_encryption.dylib.meta b/Assets/Mirror/Transports/Encryption/Native/x86_64-apple-darwin/librusty_mirror_encryption.dylib.meta new file mode 100644 index 000000000..2ce8d2246 --- /dev/null +++ b/Assets/Mirror/Transports/Encryption/Native/x86_64-apple-darwin/librusty_mirror_encryption.dylib.meta @@ -0,0 +1,33 @@ +fileFormatVersion: 2 +guid: 05c6164d5fd90e54e84a20f6c249a9f6 +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + Editor: Editor + second: + enabled: 1 + settings: + DefaultValueInitialized: true + - first: + Standalone: OSXUniversal + second: + enabled: 1 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Mirror/Transports/Encryption/Native/x86_64-pc-windows-msvc.meta b/Assets/Mirror/Transports/Encryption/Native/x86_64-pc-windows-msvc.meta new file mode 100644 index 000000000..f25adcb5e --- /dev/null +++ b/Assets/Mirror/Transports/Encryption/Native/x86_64-pc-windows-msvc.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e8552804ac328fe4cb6d1eabdc6c16e0 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Mirror/Transports/Encryption/Native/x86_64-pc-windows-msvc/rusty_mirror_encryption.dll b/Assets/Mirror/Transports/Encryption/Native/x86_64-pc-windows-msvc/rusty_mirror_encryption.dll new file mode 100644 index 000000000..7adf425a2 Binary files /dev/null and b/Assets/Mirror/Transports/Encryption/Native/x86_64-pc-windows-msvc/rusty_mirror_encryption.dll differ diff --git a/Assets/Mirror/Transports/Encryption/Native/x86_64-pc-windows-msvc/rusty_mirror_encryption.dll.meta b/Assets/Mirror/Transports/Encryption/Native/x86_64-pc-windows-msvc/rusty_mirror_encryption.dll.meta new file mode 100644 index 000000000..92966480f --- /dev/null +++ b/Assets/Mirror/Transports/Encryption/Native/x86_64-pc-windows-msvc/rusty_mirror_encryption.dll.meta @@ -0,0 +1,63 @@ +fileFormatVersion: 2 +guid: e998ea81dd4a7db4895f9dd0a7b1b851 +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + : Any + second: + enabled: 0 + settings: + Exclude Editor: 0 + Exclude Linux64: 0 + Exclude OSXUniversal: 0 + Exclude Win: 1 + Exclude Win64: 0 + - first: + Any: + second: + enabled: 1 + settings: {} + - first: + Editor: Editor + second: + enabled: 1 + settings: + CPU: AnyCPU + DefaultValueInitialized: true + OS: AnyOS + - first: + Standalone: Linux64 + second: + enabled: 1 + settings: + CPU: AnyCPU + - first: + Standalone: OSXUniversal + second: + enabled: 1 + settings: + CPU: None + - first: + Standalone: Win + second: + enabled: 0 + settings: + CPU: None + - first: + Standalone: Win64 + second: + enabled: 1 + settings: + CPU: x86_64 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Mirror/Transports/Encryption/Native/x86_64-unknown-linux-gnu.meta b/Assets/Mirror/Transports/Encryption/Native/x86_64-unknown-linux-gnu.meta new file mode 100644 index 000000000..3e59b34ca --- /dev/null +++ b/Assets/Mirror/Transports/Encryption/Native/x86_64-unknown-linux-gnu.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 229ad37adf003944cbe12c48c0cabd39 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Mirror/Transports/Encryption/Native/x86_64-unknown-linux-gnu/librusty_mirror_encryption.so b/Assets/Mirror/Transports/Encryption/Native/x86_64-unknown-linux-gnu/librusty_mirror_encryption.so new file mode 100644 index 000000000..5686fa41c Binary files /dev/null and b/Assets/Mirror/Transports/Encryption/Native/x86_64-unknown-linux-gnu/librusty_mirror_encryption.so differ diff --git a/Assets/Mirror/Transports/Encryption/Native/x86_64-unknown-linux-gnu/librusty_mirror_encryption.so.meta b/Assets/Mirror/Transports/Encryption/Native/x86_64-unknown-linux-gnu/librusty_mirror_encryption.so.meta new file mode 100644 index 000000000..4fc89a9e1 --- /dev/null +++ b/Assets/Mirror/Transports/Encryption/Native/x86_64-unknown-linux-gnu/librusty_mirror_encryption.so.meta @@ -0,0 +1,27 @@ +fileFormatVersion: 2 +guid: 7ec268e885af5d64ab9519ac0026b5a9 +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + Any: + second: + enabled: 1 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + userData: + assetBundleName: + assetBundleVariant: