Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Encryption manager #1127

Closed
wants to merge 29 commits into from
Closed
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
d559303
encryption manager start
molnard Jan 28, 2019
705db59
enable encman if wallet is loaded, gui polish
molnard Feb 1, 2019
c785394
sign message finish
molnard Feb 1, 2019
f46aacc
verifymessage gui wip
molnard Feb 1, 2019
c022935
Verify signature finish
molnard Feb 1, 2019
962b4f8
encrypt decrypt business logic
molnard Feb 2, 2019
b964153
Merge branch 'master' into encmanager
molnard Feb 2, 2019
d0fa77f
pubkeys from addresses
molnard Feb 2, 2019
f84d3d7
Merge branch 'encmanager' of github.com:molnard/WalletWasabi into enc…
molnard Feb 2, 2019
ba8b7d0
create a Pubkey instead of comparing hex strings
molnard Feb 4, 2019
89ae0a3
verify message fix
molnard Feb 4, 2019
c86ccb3
verify fail message fix
molnard Feb 4, 2019
5cf74bb
change text of public key
molnard Feb 4, 2019
f9c7891
search able address browser
molnard Feb 4, 2019
4f57b85
coinlist right click functionality and design impr
molnard Feb 7, 2019
151d561
7 sec warn messages and disposing mechanism
molnard Feb 7, 2019
17f686f
separate the disposal of encmanager due to compatibility
molnard Feb 7, 2019
d9efdb8
Merge branch 'master' into encmanager
molnard Feb 8, 2019
68eccf0
use SelectedCoin.Model.HdPubKey.PubKey
molnard Feb 8, 2019
0b4480b
better variable names, better messages
molnard Feb 8, 2019
1f7bb59
coinList right click set canExecute.
molnard Feb 8, 2019
0a5d07e
Add encman right click functionality to Receive Tab
molnard Feb 8, 2019
47b3afb
Merge branch 'master' into encmanager
molnard Feb 13, 2019
e9d3709
Merge branch 'master' into encmanager
nopara73 Feb 17, 2019
9b89af2
Enable relevant Encryption Manager tabs when wallet is not loaded.
nopara73 Feb 17, 2019
f61f1ba
Merge branch 'master' into pr/1127-encryption-manager
nopara73 Feb 18, 2019
0e609b0
Merge branch 'master' into pr/1127-encryption-manager
nopara73 Feb 18, 2019
5c9ae3f
Organize menu ordering
nopara73 Feb 18, 2019
8b32816
Merge branch 'master' into pr/1127-encryption-manager
nopara73 Feb 20, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
41 changes: 28 additions & 13 deletions WalletWasabi.Gui/Controls/WalletExplorer/CoinListView.xaml
Expand Up @@ -53,26 +53,41 @@
<ListBox Items="{Binding Coins}" VirtualizationMode="None" SelectedItem="{Binding Path=SelectedCoin, Mode=TwoWay}">
<ListBox.ContextMenu>
<ContextMenu>
<!--Enqueuing needs password, TODO: jump to password box OR display pw box in context menu + send button-->
<MenuItem Command="{Binding EnqueueCoin}" IsVisible="false">
<MenuItem.Header>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<TextBlock Text="Enqueue Coin, password:" VerticalAlignment="Center" />
<TextBox Width="50" Grid.Column="1" />
</Grid>
</MenuItem.Header>
</MenuItem>
<MenuItem Header="Dequeue from CoinJoin" Command="{Binding DequeueCoin}">
<MenuItem.Icon>
<Path HorizontalAlignment="Left"
Data="M3.24,7.51c-0.146,0.142-0.146,0.381,0,0.523l5.199,5.193c0.234,0.238,0.633,0.064,0.633-0.262v-2.634c0.105-0.007,0.212-0.011,0.321-0.011c2.373,0,4.302,1.91,4.302,4.258c0,0.957-0.33,1.809-1.008,2.602c-0.259,0.307,0.084,0.762,0.451,0.572c2.336-1.195,3.73-3.408,3.73-5.924c0-3.741-3.103-6.783-6.916-6.783c-0.307,0-0.615,0.028-0.881,0.063V2.575c0-0.327-0.398-0.5-0.633-0.261L3.24,7.51 M4.027,7.771l4.301-4.3v2.073c0,0.232,0.21,0.409,0.441,0.366c0.298-0.056,0.746-0.123,1.184-0.123c3.402,0,6.172,2.709,6.172,6.041c0,1.695-0.718,3.24-1.979,4.352c0.193-0.51,0.293-1.045,0.293-1.602c0-2.76-2.266-5-5.046-5c-0.256,0-0.528,0.018-0.747,0.05C8.465,9.653,8.328,9.81,8.328,9.995v2.074L4.027,7.771z" Fill="#22B14C"
Height="16" Width="16" Stretch="Fill" />
</MenuItem.Icon>
</MenuItem>
<MenuItem Header="Sign message" Command="{Binding SignMessage}">
<MenuItem.Icon>
<Path HorizontalAlignment="Left"
Data="F1M12,5C11.447,5 11,4.553 11,4 11,3.447 11.447,3 12,3 12.553,3 13,3.447 13,4 13,4.553 12.553,5 12,5 M15,4.5C15,2.566 13.433,1 11.5,1 10.106,1 8.913,1.82 8.35,3L8,3 8,2 7,2 6,3 6,2 5,2 4,3 4,2 3,2 1,4 1,5 2,6 8.35,6C8.913,7.18 10.106,8 11.5,8 13.433,8 15,6.434 15,4.5" Fill="#22B14C"
Height="8" Width="16" Stretch="Fill" />
</MenuItem.Icon>
</MenuItem>
<MenuItem Header="Verify message" Command="{Binding VerifyMessage}">
<MenuItem.Icon>
<Path HorizontalAlignment="Left"
Data="F1M12,5C11.447,5 11,4.553 11,4 11,3.447 11.447,3 12,3 12.553,3 13,3.447 13,4 13,4.553 12.553,5 12,5 M15,4.5C15,2.566 13.433,1 11.5,1 10.106,1 8.913,1.82 8.35,3L8,3 8,2 7,2 6,3 6,2 5,2 4,3 4,2 3,2 1,4 1,5 2,6 8.35,6C8.913,7.18 10.106,8 11.5,8 13.433,8 15,6.434 15,4.5" Fill="#22B14C"
Height="8" Width="16" Stretch="Fill" />
</MenuItem.Icon>
</MenuItem>
<MenuItem Header="Encrypt message" Command="{Binding EncryptMessage}">
<MenuItem.Icon>
<Path HorizontalAlignment="Left"
Data="F1M12,6L8,6 8,4C8,2.729 8.729,2 10,2 11.271,2 12,2.729 12,4z M13,6L13,4C13,2.178 11.822,1 10,1 8.178,1 7,2.178 7,4L7,6 6.949,6C6.973,6.165 7,6.329 7,6.5 7,6.669 6.987,6.836 6.964,7L14,7 14,13 7,13 7,14 15,14 15,6z M9,9C9,8.448 9.448,8 10,8 10.552,8 11,8.448 11,9 11,9.366 10.794,9.673 10.5,9.847L10.5,12 9.5,12 9.5,9.847C9.206,9.673,9,9.366,9,9 M5,6.5C5,7.328 4.329,8 3.5,8 2.671,8 2,7.328 2,6.5 2,5.672 2.671,5 3.5,5 4.329,5 5,5.672 5,6.5 M1,6.5C1,7.709,1.859,8.769,3,9L3,15 4,15 4,14 6,14 6,13 4,13 4,12 6,12 6,11 4,11 4,9C5.141,8.769 6,7.709 6,6.5 6,5.119 4.881,4 3.5,4 2.119,4 1,5.119 1,6.5" Fill="#22B14C"
Height="16" Width="16" Stretch="Fill" />
</MenuItem.Icon>
</MenuItem>
<MenuItem Header="Decrypt message" Command="{Binding DecryptMessage}">
<MenuItem.Icon>
<Path HorizontalAlignment="Left"
Data="F1M12,6L8,6 8,4C8,2.729 8.729,2 10,2 11.271,2 12,2.729 12,4z M13,6L13,4C13,2.178 11.822,1 10,1 8.178,1 7,2.178 7,4L7,6 6.949,6C6.973,6.165 7,6.329 7,6.5 7,6.669 6.987,6.836 6.964,7L14,7 14,13 7,13 7,14 15,14 15,6z M9,9C9,8.448 9.448,8 10,8 10.552,8 11,8.448 11,9 11,9.366 10.794,9.673 10.5,9.847L10.5,12 9.5,12 9.5,9.847C9.206,9.673,9,9.366,9,9 M5,6.5C5,7.328 4.329,8 3.5,8 2.671,8 2,7.328 2,6.5 2,5.672 2.671,5 3.5,5 4.329,5 5,5.672 5,6.5 M1,6.5C1,7.709,1.859,8.769,3,9L3,15 4,15 4,14 6,14 6,13 4,13 4,12 6,12 6,11 4,11 4,9C5.141,8.769 6,7.709 6,6.5 6,5.119 4.881,4 3.5,4 2.119,4 1,5.119 1,6.5" Fill="#22B14C"
Height="16" Width="16" Stretch="Fill" />
</MenuItem.Icon>
</MenuItem>
</ContextMenu>
</ListBox.ContextMenu>
<ListBox.ItemTemplate>
Expand Down
39 changes: 39 additions & 0 deletions WalletWasabi.Gui/Controls/WalletExplorer/CoinListViewModel.cs
Expand Up @@ -16,6 +16,11 @@
using DynamicData.Binding;
using System.Threading.Tasks;
using System.Reactive.Disposables;
using AvalonStudio.Extensibility;
using AvalonStudio.Shell;
using WalletWasabi.Gui.Tabs.EncryptionManager;
using AvalonStudio.Commands;
using System.Composition;

namespace WalletWasabi.Gui.Controls.WalletExplorer
{
Expand Down Expand Up @@ -51,6 +56,11 @@ private SortExpressionComparer<CoinViewModel> MyComparer
public ReactiveCommand SelectNonPrivateCheckBoxCommand { get; }
public ReactiveCommand SortCommand { get; }

public ReactiveCommand EncryptMessage { get; }
public ReactiveCommand DecryptMessage { get; }
public ReactiveCommand SignMessage { get; }
public ReactiveCommand VerifyMessage { get; }

public event Action DequeueCoinsPressed;

public event EventHandler<CoinViewModel> SelectionChanged;
Expand Down Expand Up @@ -180,6 +190,7 @@ private void SelectAllCoins(bool valueOfSelected, Func<CoinViewModel, bool> coin

public CoinListViewModel()
{
CommandIconService commandIconService = IoC.Get<CommandIconService>();
RemovedCoinViewModels = new List<CoinViewModel>();
Disposables = new CompositeDisposable();
AmountSortDirection = SortOrder.Decreasing;
Expand Down Expand Up @@ -314,6 +325,28 @@ public CoinListViewModel()

SortCommand = ReactiveCommand.Create(() => RefreshOrdering()).DisposeWith(Disposables);

SignMessage = ReactiveCommand.Create(() =>
{
OnEncryptionManager(EncryptionManagerViewModel.Tabs.Sign, SelectedCoin.Address);
}).DisposeWith(Disposables);

VerifyMessage = ReactiveCommand.Create(() =>
{
OnEncryptionManager(EncryptionManagerViewModel.Tabs.Verify, SelectedCoin.Address);
}).DisposeWith(Disposables);

EncryptMessage = ReactiveCommand.Create(() =>
{
var res = Global.WalletService.KeyManager.GetKeyForScriptPubKey(SelectedCoin.Model.ScriptPubKey)?.PubKey?.ToHex();
molnard marked this conversation as resolved.
Show resolved Hide resolved
OnEncryptionManager(EncryptionManagerViewModel.Tabs.Encrypt, res);
}).DisposeWith(Disposables);

DecryptMessage = ReactiveCommand.Create(() =>
{
var res = Global.WalletService.KeyManager.GetKeyForScriptPubKey(SelectedCoin.Model.ScriptPubKey)?.PubKey?.ToHex();
molnard marked this conversation as resolved.
Show resolved Hide resolved
OnEncryptionManager(EncryptionManagerViewModel.Tabs.Decrypt, res);
}).DisposeWith(Disposables);

SetSelections();
SetCoinJoinStatusWidth();
}
Expand Down Expand Up @@ -402,6 +435,12 @@ private void Coin_PropertyChanged(object sender, PropertyChangedEventArgs e)
});
}

private void OnEncryptionManager(EncryptionManagerViewModel.Tabs selectedTab, string content)
{
var encryptionManagerViewModel = IoC.Get<IShell>().GetOrCreate<EncryptionManagerViewModel>();
encryptionManagerViewModel.SelectTab(selectedTab, content);
}

#region IDisposable Support

private volatile bool _disposedValue = false; // To detect redundant calls
Expand Down
35 changes: 34 additions & 1 deletion WalletWasabi.Gui/Global.cs
Expand Up @@ -6,11 +6,13 @@
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.ComponentModel;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Sockets;
using System.Reactive.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading;
Expand Down Expand Up @@ -66,14 +68,44 @@ public static string TorLogsFile
public static NodesGroup Nodes { get; private set; }
public static WasabiSynchronizer Synchronizer { get; private set; }
public static CcjClient ChaumianClient { get; private set; }
public static WalletService WalletService { get; private set; }

public static WalletService WalletService
{
get => WalletServiceField;
private set
{
if (WalletServiceField == value) return;
WalletServiceField = value;
NotifyStaticPropertyChanged(nameof(WalletService));
}
}

public static Node RegTestMemPoolServingNode { get; private set; }
public static UpdateChecker UpdateChecker { get; private set; }
public static TorProcessManager TorManager { get; private set; }

public static Config Config { get; private set; }
public static UiConfig UiConfig { get; private set; }

public static event EventHandler<PropertyChangedEventArgs> StaticPropertyChanged;

private static void NotifyStaticPropertyChanged(string propertyName)
{
StaticPropertyChanged?.Invoke(null, new PropertyChangedEventArgs(propertyName));
}

public static IObservable<PropertyChangedEventArgs> WhenPropertyChanged
{
get
{
return Observable
.FromEventPattern<PropertyChangedEventArgs>(
h => StaticPropertyChanged += h,
h => StaticPropertyChanged -= h)
.Select(x => x.EventArgs);
}
}

public static void InitializeConfig(Config config)
{
Config = Guard.NotNull(nameof(config), config);
Expand Down Expand Up @@ -258,6 +290,7 @@ public static void InitializeNoWallet()
}

private static CancellationTokenSource CancelWalletServiceInitialization = null;
private static WalletService WalletServiceField;

public static async Task InitializeWalletServiceAsync(KeyManager keyManager)
{
Expand Down
9 changes: 9 additions & 0 deletions WalletWasabi.Gui/Icons/Icons.xaml
Expand Up @@ -54,6 +54,15 @@
</DrawingGroup.Children>
</DrawingGroup>

<DrawingGroup x:Key="EncryptionManager">
<DrawingGroup.Children>
<GeometryDrawing Brush="#00FFFFFF" Geometry="F1M16,16L0,16 0,0 16,0z" />
<GeometryDrawing Brush="#FFF6F6F6" Geometry="F1M16,5L16,15 5,15 5,16 2,16 2,9.711C0.805,9.136 0,7.894 0,6.5 0,4.57 1.57,3 3.5,3 4.48,3 5.364,3.407 6,4.058L6,4C6,1.607 7.607,0 10,0 12.393,0 14,1.607 14,4L14,5z" />
<GeometryDrawing Brush="#FFEFEFF0" Geometry="F1M10.5,9.8467L10.5,11.9997 9.5,11.9997 9.5,9.8467C9.206,9.6727 9,9.3657 9,8.9997 9,8.4477 9.448,7.9997 10,7.9997 10.552,7.9997 11,8.4477 11,8.9997 11,9.3657 10.794,9.6727 10.5,9.8467 M6.964,6.9997C6.858,7.7577,6.509,8.4417,6,8.9727L6,9.9997 7,9.9997 7,12.9997 14,12.9997 14,6.9997z M5,6.4997C5,7.3277 4.329,7.9997 3.5,7.9997 2.671,7.9997 2,7.3277 2,6.4997 2,5.6717 2.671,4.9997 3.5,4.9997 4.329,4.9997 5,5.6717 5,6.4997" />
<GeometryDrawing Brush="#FF424242" Geometry="F1M12,6L8,6 8,4C8,2.729 8.729,2 10,2 11.271,2 12,2.729 12,4z M13,6L13,4C13,2.178 11.822,1 10,1 8.178,1 7,2.178 7,4L7,6 6.949,6C6.973,6.165 7,6.329 7,6.5 7,6.669 6.987,6.836 6.964,7L14,7 14,13 7,13 7,14 15,14 15,6z M9,9C9,8.448 9.448,8 10,8 10.552,8 11,8.448 11,9 11,9.366 10.794,9.673 10.5,9.847L10.5,12 9.5,12 9.5,9.847C9.206,9.673,9,9.366,9,9 M5,6.5C5,7.328 4.329,8 3.5,8 2.671,8 2,7.328 2,6.5 2,5.672 2.671,5 3.5,5 4.329,5 5,5.672 5,6.5 M1,6.5C1,7.709,1.859,8.769,3,9L3,15 4,15 4,14 6,14 6,13 4,13 4,12 6,12 6,11 4,11 4,9C5.141,8.769 6,7.709 6,6.5 6,5.119 4.881,4 3.5,4 2.119,4 1,5.119 1,6.5" />
</DrawingGroup.Children>
</DrawingGroup>

<DrawingGroup x:Key="Settings">
<DrawingGroup.Children>
<GeometryDrawing Brush="#FFF6F6F6" Geometry="F1M0,16L16,16 16,0 0,0z" />
Expand Down
57 changes: 55 additions & 2 deletions WalletWasabi.Gui/Shell/Commands/ToolCommands.cs
Expand Up @@ -8,11 +8,19 @@
using System.Linq;
using WalletWasabi.Gui.Tabs.WalletManager;
using WalletWasabi.Gui.Tabs;
using WalletWasabi.Gui.Tabs.EncryptionManager;
using System.Reactive.Linq;
using System.ComponentModel;
using WalletWasabi.Services;
using System;
using System.Reactive.Disposables;

namespace WalletWasabi.Gui.Shell.Commands
{
internal class ToolCommands
internal class ToolCommands : IDisposable
{
private CompositeDisposable Disposables { get; } = new CompositeDisposable();

[ImportingConstructor]
public ToolCommands(CommandIconService commandIconService)
{
Expand All @@ -21,13 +29,25 @@ public ToolCommands(CommandIconService commandIconService)
commandIconService.GetCompletionKindImage("WalletManager"),
ReactiveCommand.Create(OnWalletManager));

var isWalletLoaded = Global.WhenPropertyChanged
.Where(x => x.PropertyName == nameof(WalletService)) //looking for the wallet is loaded
.Select(ws => ws != null) //if it is not null -> wallet is loaded
.ObserveOn(RxApp.MainThreadScheduler); //syncronize with the UI

var encCommand = ReactiveCommand.Create(OnEncryptionManager, isWalletLoaded).DisposeWith(Disposables);

EncryptionManagerCommand = new CommandDefinition(
"Encryption Manager",
commandIconService.GetCompletionKindImage("EncryptionManager"),
encCommand);

SettingsCommand = new CommandDefinition(
"Settings",
commandIconService.GetCompletionKindImage("Settings"),
ReactiveCommand.Create(() =>
{
IoC.Get<IShell>().AddOrSelectDocument(() => new SettingsViewModel());
}));
}).DisposeWith(Disposables));
}

private void OnWalletManager()
Expand All @@ -45,10 +65,43 @@ private void OnWalletManager()
}
}

private void OnEncryptionManager()
{
var encryptionManagerViewModel = IoC.Get<IShell>().GetOrCreate<EncryptionManagerViewModel>();
encryptionManagerViewModel.SelectTab(EncryptionManagerViewModel.Tabs.Sign);
}

[ExportCommandDefinition("Tools.WalletManager")]
public CommandDefinition WalletManagerCommand { get; }

[ExportCommandDefinition("Tools.EncryptionManager")]
public CommandDefinition EncryptionManagerCommand { get; }

[ExportCommandDefinition("Tools.Settings")]
public CommandDefinition SettingsCommand { get; }

#region IDisposable Support

private volatile bool _disposedValue = false; // To detect redundant calls

protected virtual void Dispose(bool disposing)
{
if (!_disposedValue)
{
if (disposing)
{
Disposables.Dispose();
molnard marked this conversation as resolved.
Show resolved Hide resolved
}

_disposedValue = true;
}
}

public void Dispose()
{
Dispose(true);
}

#endregion IDisposable Support
}
}
5 changes: 5 additions & 0 deletions WalletWasabi.Gui/Shell/MainMenu/ToolsMainMenuItems.cs
Expand Up @@ -30,6 +30,11 @@ public ToolsMainMenuItems(IMenuItemFactory menuItemFactory)
[DefaultGroup("Wallet")]
public IMenuItem GenerateWallet => _menuItemFactory.CreateCommandMenuItem("Tools.WalletManager");

[ExportMainMenuItem("Tools", "EncryptionManager")]
[DefaultOrder(0)]
[DefaultGroup("Wallet")]
public IMenuItem SignMessage => _menuItemFactory.CreateCommandMenuItem("Tools.EncryptionManager");

[ExportMainMenuDefaultGroup("Tools", "Settings")]
[DefaultOrder(1000)]
public object SettingsGroup => null;
Expand Down
58 changes: 58 additions & 0 deletions WalletWasabi.Gui/Tabs/EncryptionManager/DecryptMessageView.xaml
@@ -0,0 +1,58 @@
<UserControl xmlns="https://github.com/avaloniaui"
xmlns:controls="clr-namespace:WalletWasabi.Gui.Controls;assembly=WalletWasabi.Gui" Design.Width="600">
<controls:GroupBox Title="{Binding Title}" BorderThickness="0" Classes="docTabContainer">
<Grid Classes="content" Margin="0 40 0 0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>

<Expander Grid.Row="0" Margin="0 10" IsExpanded="{Binding IsSearchResultExpanded}" VerticalContentAlignment="Top" VerticalAlignment="Top">
<Expander.Header>
<TextBlock Text="Public key browser" Height="19" VerticalAlignment="Center" />
</Expander.Header>
<ListBox Items="{Binding Addresses}" SelectedItem="{Binding SelectedItem}" MaxHeight="300" MinHeight="100" ScrollViewer.HorizontalScrollBarVisibility="Auto">
<ListBox.ItemTemplate>
<DataTemplate>
<Grid ColumnDefinitions="400 400 700">
<Grid.Styles>
<Style Selector="TextBlock">
<Setter Property="VerticalAlignment" Value="Center" />
</Style>
</Grid.Styles>
<TextBlock Text="{Binding Address}" Grid.Column="0" Margin="10 0" />
<TextBlock Text="{Binding Label}" Grid.Column="1" Margin="10 0" />
<TextBlock Text="{Binding PubKey}" Grid.Column="2" Margin="10 0" />
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Expander>
<StackPanel Grid.Row="0" Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Top">
<DrawingPresenter VerticalAlignment="Center" HorizontalAlignment="Center" Width="20" Height="20" Margin="10 0">
<DrawingPresenter.Drawing>
<DrawingGroup>
<DrawingGroup.Children>
<GeometryDrawing Brush="#00FFFFFF" Geometry="F1M16,16L0,16 0,0 16,0z" />
<GeometryDrawing Brush="#FFF6F6F6" Geometry="F1M16,5.8335C16,9.0495 13.384,11.6665 10.167,11.6665 9.136,11.6665 8.144,11.3925 7.254,10.8675L2.561,15.5605C2.277,15.8435 1.9,16.0005 1.5,16.0005 1.1,16.0005 0.723000000000001,15.8435 0.439,15.5605 -0.146000000000001,14.9755 -0.146000000000001,14.0245 0.439,13.4395L5.133,8.7445C4.608,7.8555 4.333,6.8635 4.333,5.8335 4.333,2.6165 6.95,0.000500000000000611 10.167,0.000500000000000611 13.384,0.000500000000000611 16,2.6165 16,5.8335" />
<GeometryDrawing Brush="#FFF0EFF1" Geometry="F1M14,5.8335C14,7.9475 12.28,9.6665 10.167,9.6665 8.053,9.6665 6.333,7.9475 6.333,5.8335 6.333,3.7195 8.053,2.0005 10.167,2.0005 12.28,2.0005 14,3.7195 14,5.8335" />
<GeometryDrawing Brush="#FF424242" Geometry="F1M10.167,9.667C8.053,9.667 6.334,7.947 6.334,5.834 6.334,3.72 8.053,2 10.167,2 12.28,2 14,3.72 14,5.834 14,7.947 12.28,9.667 10.167,9.667 M10.167,1C7.502,1 5.334,3.168 5.334,5.834 5.334,6.985 5.755,8.03 6.431,8.862L1.147,14.146C0.951000000000001,14.342 0.951000000000001,14.658 1.147,14.854 1.244,14.951 1.372,15 1.5,15 1.628,15 1.756,14.951 1.854,14.854L7.138,9.569C7.969,10.245 9.015,10.667 10.167,10.667 12.832,10.667 15,8.499 15,5.834 15,3.168 12.832,1 10.167,1" />
</DrawingGroup.Children>
</DrawingGroup>
</DrawingPresenter.Drawing>
</DrawingPresenter>
<controls:ExtendedTextBox Margin="0 10" Text="{Binding AddressSearch}" Watermark="Enter address here..." Width="500" Height="30" />
</StackPanel>
<controls:ExtendedTextBox Grid.Row="1" Text="{Binding MyPublicKey}" Watermark="My public key" TextWrapping="Wrap" AcceptsReturn="True" UseFloatingWatermark="True" />
<controls:ExtendedTextBox Grid.Row="2" Text="{Binding EncryptedMessage}" Watermark="Encrypted message" UseFloatingWatermark="True" TextWrapping="Wrap" AcceptsReturn="True" />
<controls:ExtendedTextBox Grid.Row="3" Text="{Binding DecryptedMessage}" Watermark="Decrypted message" TextWrapping="Wrap" IsReadOnly="True" AcceptsReturn="True" UseFloatingWatermark="True" />
<DockPanel Grid.Row="4" LastChildFill="True">
<Button DockPanel.Dock="Right" Content="Decrypt" Command="{Binding DecryptCommand}" Width="100" />
<TextBlock Text="{Binding WarningMessage}" Classes="warningMessage" TextWrapping="Wrap" />
</DockPanel>
</Grid>
</controls:GroupBox>
</UserControl>
21 changes: 21 additions & 0 deletions WalletWasabi.Gui/Tabs/EncryptionManager/DecryptMessageView.xaml.cs
@@ -0,0 +1,21 @@
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
using System;
using System.Collections.Generic;
using System.Text;

namespace WalletWasabi.Gui.Tabs.EncryptionManager
{
internal class DecryptMessageView : UserControl
{
public DecryptMessageView()
{
InitializeComponent();
}

private void InitializeComponent()
{
AvaloniaXamlLoader.Load(this);
}
}
}