Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
85e72b0
Minor improvements around widgets insertion
d2dyno1 Mar 19, 2026
2df7290
Added Gallery picker to MAUI
d2dyno1 Mar 20, 2026
de0f6bc
Added GetAvailableDestinationNameAsync check to recycle bin
d2dyno1 Mar 20, 2026
e9037ac
Renamed Dashboard to AppPlatform
d2dyno1 Mar 21, 2026
ea4ce82
Added AppPlatform
d2dyno1 Mar 21, 2026
cf0592a
Groundwork for AppPlatform
d2dyno1 Mar 21, 2026
3a5bf88
Update submodules
d2dyno1 Mar 21, 2026
cec9a9e
Update SecureFolderFS.AppPlatform
d2dyno1 Mar 21, 2026
c7fcd89
Improved FileSystemSlide design
d2dyno1 Mar 26, 2026
9be3e00
Merge branch 'master' into f_rc1
d2dyno1 Mar 26, 2026
768fec5
Improved the design of AuthenticationSlide
d2dyno1 Mar 26, 2026
20433cf
Added CenterWindow to MacOsWindowHelper
d2dyno1 Mar 26, 2026
20ea79d
Improved EncryptedFileSlide design
d2dyno1 Mar 26, 2026
f6d9619
Fixed build
d2dyno1 Mar 27, 2026
5a5f7d3
Added iridescent effect to the magnifier ring
d2dyno1 Mar 27, 2026
15ef328
Update EncryptedFileSlide.xaml.cs
d2dyno1 Mar 27, 2026
688023e
Added deformation, fresnel, and inner shadow
d2dyno1 Mar 27, 2026
6024280
Update caches in RepairNameAsync
d2dyno1 Mar 28, 2026
26b354b
Added AuthenticationSlide animation
d2dyno1 Mar 28, 2026
d48b614
Disable intro screen for testing
d2dyno1 Mar 28, 2026
acda210
Fixed ExecutionEngineException on WinUI
d2dyno1 Mar 28, 2026
8bf831d
Added ring deformation
d2dyno1 Mar 28, 2026
05844cf
Adjusted iridescent effect and randomize wallpapers
d2dyno1 Mar 28, 2026
844ab22
Revert
d2dyno1 Mar 28, 2026
07beeb9
Safety checks in Recycle Bin Folder
d2dyno1 Mar 28, 2026
aab72ce
Added missing intro screenshots
d2dyno1 Mar 28, 2026
44cc105
Merge branch 'master' into f_rc1
d2dyno1 Mar 28, 2026
dffde07
Added CredentialTests
d2dyno1 Mar 29, 2026
ae3e82c
Added Path and Encrypted Path properties on MAUI
d2dyno1 Mar 29, 2026
249acca
Updated license files
d2dyno1 Mar 29, 2026
bc7a9b6
Update LicensesDialog.xaml
d2dyno1 Mar 29, 2026
0cde8bb
Update WindowsAppSDK LICENSE
d2dyno1 Mar 29, 2026
aae735d
Merge branch 'master' into f_rc1
d2dyno1 Mar 30, 2026
50fea4d
Fixed some warnings
d2dyno1 Mar 30, 2026
b3b2f9d
Removed redundant code
d2dyno1 Mar 30, 2026
53542a0
Merge branch 'master' into f_rc1
d2dyno1 Mar 30, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace SecureFolderFS.Core.Cryptography.Cipher
{
[Obsolete("AES-CTR + HMAC encryption mode is deprecated.")]
public static class AesCtr128
public static class AesCtr256
{
private const ulong CTR_START = 0UL;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@

namespace SecureFolderFS.Core.Cryptography.Cipher
{
/// TODO: Needs docs
public static class AesGcm128
public static class AesGcm256
{
public static void Encrypt(ReadOnlySpan<byte> bytes, ReadOnlySpan<byte> key, ReadOnlySpan<byte> nonce, Span<byte> tag, Span<byte> result, ReadOnlySpan<byte> associatedData)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
using Miscreant;
using System;
using System;
using System.Runtime.CompilerServices;
using System.Security.Cryptography;
using Miscreant;

namespace SecureFolderFS.Core.Cryptography.Cipher
{
// TODO: Needs docs
public sealed class AesSiv128 : IDisposable
public sealed class AesSiv256 : IDisposable
{
private readonly Aead _aesCmacSiv;

private AesSiv128(Aead aesCmacSiv)
private AesSiv256(Aead aesCmacSiv)
{
_aesCmacSiv = aesCmacSiv;
}

public static AesSiv128 CreateInstance(ReadOnlySpan<byte> dekKey, ReadOnlySpan<byte> macKey)
public static AesSiv256 CreateInstance(ReadOnlySpan<byte> dekKey, ReadOnlySpan<byte> macKey)
{
// The longKey will be split into two keys - one for S2V and the other one for CTR
var longKey = new byte[dekKey.Length + macKey.Length];
Expand All @@ -26,7 +24,7 @@ public static AesSiv128 CreateInstance(ReadOnlySpan<byte> dekKey, ReadOnlySpan<b
macKey.CopyTo(longKeySpan.Slice(dekKey.Length));

var aesCmacSiv = Aead.CreateAesCmacSiv(longKey);
return new AesSiv128(aesCmacSiv);
return new AesSiv256(aesCmacSiv);
}

[MethodImpl(MethodImplOptions.Synchronized)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public override unsafe void EncryptChunk(ReadOnlySpan<byte> plaintextChunk, long
RandomNumberGenerator.Fill(ciphertextChunk.Slice(0, CHUNK_NONCE_SIZE));

// Encrypt
AesCtr128.Encrypt(
AesCtr256.Encrypt(
plaintextChunk,
header.GetHeaderContentKey(),
ciphertextChunk.Slice(0, CHUNK_NONCE_SIZE),
Expand Down Expand Up @@ -114,7 +114,7 @@ public override unsafe bool DecryptChunk(ReadOnlySpan<byte> ciphertextChunk, lon
}

// Decrypt
AesCtr128.Decrypt(
AesCtr256.Decrypt(
ciphertextChunk.GetChunkPayload(),
header.GetHeaderContentKey(),
ciphertextChunk.GetChunkNonce(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public override void EncryptChunk(ReadOnlySpan<byte> plaintextChunk, long chunkN
CryptHelpers.FillAssociatedDataBigEndian(associatedData, header.GetHeaderNonce(), chunkNumber);

// Encrypt
AesGcm128.Encrypt(
AesGcm256.Encrypt(
plaintextChunk,
header.GetHeaderContentKey(),
ciphertextChunk.Slice(0, CHUNK_NONCE_SIZE),
Expand All @@ -52,7 +52,7 @@ public override bool DecryptChunk(ReadOnlySpan<byte> ciphertextChunk, long chunk
CryptHelpers.FillAssociatedDataBigEndian(associatedData, header.GetHeaderNonce(), chunkNumber);

// Decrypt
return AesGcm128.TryDecrypt(
return AesGcm256.TryDecrypt(
ciphertextChunk.GetChunkPayload(),
header.GetHeaderContentKey(),
ciphertextChunk.GetChunkNonce(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public override unsafe void EncryptHeader(ReadOnlySpan<byte> plaintextHeader, Sp
var pt = new ReadOnlySpan<byte>((byte*)s.ptPtr, s.ptLen);
var ct = new Span<byte>((byte*)s.ctPtr, s.ctLen);

AesCtr128.Encrypt(
AesCtr256.Encrypt(
pt.GetHeaderContentKey(),
dekKey,
pt.GetHeaderNonce(),
Expand Down Expand Up @@ -113,7 +113,7 @@ public override unsafe bool DecryptHeader(ReadOnlySpan<byte> ciphertextHeader, S
var ct = new ReadOnlySpan<byte>((byte*)s.ctPtr, s.ctLen);
var pt = new Span<byte>((byte*)s.ptPtr, s.ptLen);

AesCtr128.Decrypt(
AesCtr256.Decrypt(
ct.GetHeaderContentKey(),
dekKey,
ct.GetHeaderNonce(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public override unsafe void EncryptHeader(ReadOnlySpan<byte> plaintextHeader, Sp
var ct = new Span<byte>((byte*)s.ctPtr, s.ctLen);

// Encrypt
AesGcm128.Encrypt(
AesGcm256.Encrypt(
pt.GetHeaderContentKey(),
dekKey,
pt.GetHeaderNonce(),
Expand Down Expand Up @@ -76,7 +76,7 @@ public override unsafe bool DecryptHeader(ReadOnlySpan<byte> ciphertextHeader, S
var pt = new Span<byte>((byte*)s.ptPtr, s.ptLen);

// Decrypt
return AesGcm128.TryDecrypt(
return AesGcm256.TryDecrypt(
ct.GetHeaderContentKey(),
dekKey,
ct.GetHeaderNonce(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,29 @@ namespace SecureFolderFS.Core.Cryptography.NameCrypt
/// <inheritdoc cref="INameCrypt"/>
internal sealed class AesSivNameCrypt : BaseNameCrypt
{
private readonly AesSiv128 _aesSiv128;
private readonly AesSiv256 _aesSiv256;

public AesSivNameCrypt(KeyPair keyPair, string fileNameEncodingId)
: base(fileNameEncodingId)
{
_aesSiv128 = keyPair.UseKeys((dekKey, macKey) =>
_aesSiv256 = keyPair.UseKeys((dekKey, macKey) =>
{
return AesSiv128.CreateInstance(dekKey.ToArray(), macKey.ToArray()); // Note: AesSiv128 requires a byte[] key.
return AesSiv256.CreateInstance(dekKey.ToArray(), macKey.ToArray()); // Note: AesSiv128 requires a byte[] key.
});
}

/// <inheritdoc/>
protected override byte[] EncryptFileName(ReadOnlySpan<byte> plaintextFileNameBuffer, ReadOnlySpan<byte> directoryId)
{
return _aesSiv128.Encrypt(plaintextFileNameBuffer, directoryId);
return _aesSiv256.Encrypt(plaintextFileNameBuffer, directoryId);
}

/// <inheritdoc/>
protected override byte[]? DecryptFileName(ReadOnlySpan<byte> ciphertextFileNameBuffer, ReadOnlySpan<byte> directoryId)
{
try
{
return _aesSiv128.Decrypt(ciphertextFileNameBuffer, directoryId);
return _aesSiv256.Decrypt(ciphertextFileNameBuffer, directoryId);
}
catch (CryptographicException)
{
Expand All @@ -41,7 +41,7 @@ protected override byte[] EncryptFileName(ReadOnlySpan<byte> plaintextFileNameBu
/// <inheritdoc/>
public override void Dispose()
{
_aesSiv128.Dispose();
_aesSiv256.Dispose();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public static async Task<IResult> RepairDirectoryAsync(IFolder affected, Securit
if (PathHelpers.IsCoreName(item.Name))
continue;

// Encrypt new name
// Encrypt a new name
var encryptedName = security.NameCrypt.EncryptName(item.Name, directoryId);
encryptedName = $"{encryptedName}{Constants.Names.ENCRYPTED_FILE_EXTENSION}";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,37 @@
using System.IO;
using System.Threading;
using System.Threading.Tasks;
using SecureFolderFS.Core.FileSystem.Helpers.Paths.Abstract;
using SecureFolderFS.Shared.Helpers;

namespace SecureFolderFS.Core.FileSystem.Helpers.Health
{
public static partial class HealthHelpers
{
public static async Task<IResult> RepairNameAsync(IStorableChild affected, FileSystemSpecifics specifics, string newName, CancellationToken cancellationToken)
{
return await RepairNameAsync(affected, specifics.Security, specifics.ContentFolder, newName, cancellationToken);
var repairResult = await RepairNameAsync(affected, specifics.Security, specifics.ContentFolder, newName, cancellationToken);
if (!repairResult.Successful || !specifics.CiphertextFileNameCache.IsAvailable)
return repairResult;

// TODO: Update caches in FileSystemSpecifics
// Update cache
await SafetyHelpers.NoFailureAsync(async () =>
{
var parent = await affected.GetParentAsync(cancellationToken);
if (parent is null)
return;

var directoryId = AbstractPathHelpers.AllocateDirectoryId(specifics.Security);
var isAllocated = await AbstractPathHelpers.GetDirectoryIdAsync(parent, specifics, directoryId, cancellationToken);
specifics.CiphertextFileNameCache.CacheRemove(new(isAllocated ? directoryId : [], affected.Name));
});

return repairResult;
}

public static async Task<IResult> RepairNameAsync(IStorableChild affected, Security security, IFolder contentFolder, string newName, CancellationToken cancellationToken)
private static async Task<IResult> RepairNameAsync(IStorableChild affected, Security security, IFolder contentFolder, string newName, CancellationToken cancellationToken)
{
// Return success, if no encryption is used
// Return success if no encryption is used
if (security.NameCrypt is null)
return Result.Success;

Expand Down
19 changes: 19 additions & 0 deletions src/Platforms/SecureFolderFS.Maui/Popups/PropertiesPopup.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,25 @@
IsLastItem="True"
Subtitle="{Binding ViewModel.DateModifiedText, Mode=OneWay}" />

<!-- Path -->
<uc:ItemProperty
Title="{l:ResourceString Rid=Path}"
Command="{Binding ViewModel.CopyPropertyCommand, Mode=OneWay}"
CommandParameter="Path"
IsLastItem="True"
IsVisible="{Binding ViewModel.Id, Mode=OneWay, Converter={StaticResource NullToBoolConverter}}"
Subtitle="{Binding ViewModel.Id, Mode=OneWay}" />

<!-- Encrypted Path -->
<uc:ItemProperty
Title="{l:ResourceString Rid=EncryptedPath}"
Command="{Binding ViewModel.CopyPropertyCommand, Mode=OneWay}"
CommandParameter="EncryptedPath"
IsLastItem="True"
IsVisible="{Binding ViewModel.CiphertextId, Mode=OneWay, Converter={StaticResource NullToBoolConverter}}"
Subtitle="{Binding ViewModel.CiphertextId, Mode=OneWay}"
SubtitleTruncation="HeadTruncation" />

</VerticalStackLayout>
</VerticalStackLayout>
</Border>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<Label
FontAttributes="Bold"
FontSize="15"
LineBreakMode="TailTruncation"
LineBreakMode="{Binding SubtitleTruncation, Mode=OneWay, Source={x:Reference ThisControl}}"
Text="{Binding Subtitle, Mode=OneWay, Source={x:Reference ThisControl}}" />
</VerticalStackLayout>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ public bool IsLastItem
}
public static readonly BindableProperty IsLastItemProperty =
BindableProperty.Create(nameof(IsLastItem), typeof(bool), typeof(ItemProperty), false);

public LineBreakMode SubtitleTruncation
{
get => (LineBreakMode)GetValue(SubtitleTruncationProperty);
set => SetValue(SubtitleTruncationProperty, value);
}
public static readonly BindableProperty SubtitleTruncationProperty =
BindableProperty.Create(nameof(SubtitleTruncation), typeof(LineBreakMode), typeof(ItemProperty), LineBreakMode.TailTruncation);

public string? Title
{
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Svg.Skia
https://github.com/wieslawsoltes/Svg.Skia/blob/master/LICENSE.TXT
AcrylicView.Maui
https://github.com/sswi/AcrylicView.MAUI/blob/master/LICENSE.txt
MIT
https://github.com/wieslawsoltes/Svg.Skia
https://github.com/sswi/AcrylicView.MAUI

MIT License

Copyright (c) 2020 Wiesław Šoltés
Copyright (c) [2023] [XECC]

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
Android Libraries
https://github.com/dotnet/android-libraries/blob/main/LICENSE.TXT
MIT
https://github.com/dotnet/android-libraries

The MIT License (MIT)

Copyright (c) .NET Foundation and Contributors

All rights reserved.

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.
Loading