Skip to content

[PS-2251] Implement argon2 kdf #4468

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

Merged
merged 14 commits into from
Jan 26, 2023
Merged
Prev Previous commit
Next Next commit
Replace magic numbers by enum
  • Loading branch information
quexten committed Jan 23, 2023
commit e3a5808ac107fcf508860f76e6de50d08cb54858
8 changes: 4 additions & 4 deletions apps/web/src/app/settings/change-kdf.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ <h1>{{ "encKeySettings" | i18n }}</h1>
</div>
<div class="col-6">
<div class="form-group mb-0">
<ng-container *ngIf="kdf == 0">
<ng-container *ngIf="kdf == kdfType.PBKDF2_SHA256">
<label for="kdfIterations">{{ "kdfIterations" | i18n }}</label>
<a
class="ml-auto"
Expand All @@ -68,7 +68,7 @@ <h1>{{ "encKeySettings" | i18n }}</h1>
required
/>
</ng-container>
<ng-container *ngIf="kdf == 1">
<ng-container *ngIf="kdf == kdfType.Argon2id">
<label for="kdfIterations">KDF Iterations</label>
<a
class="ml-auto"
Expand All @@ -95,12 +95,12 @@ <h1>{{ "encKeySettings" | i18n }}</h1>
<div class="col-12">
<div class="form-group">
<div class="small form-text text-muted">
<ng-container *ngIf="kdf == 0">
<ng-container *ngIf="kdf == kdfType.PBKDF2_SHA256">
<p>{{ "kdfIterationsDesc" | i18n: (recommendedPBKDF2Iterations | number) }}</p>
<strong>{{ "warning" | i18n }}</strong
>: {{ "kdfIterationsWarning" | i18n: (50000 | number) }}
</ng-container>
<ng-container *ngIf="kdf == 1">
<ng-container *ngIf="kdf == kdfType.Argon2id">
<p>
{{ "argon2MemoryDesc" | i18n }}
</p>
Expand Down
1 change: 1 addition & 0 deletions apps/web/src/app/settings/change-kdf.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export class ChangeKdfComponent implements OnInit {
masterPassword: string;
kdf = KdfType.PBKDF2_SHA256;
kdfIterations = DEFAULT_PBKDF2_ITERATIONS;
kdfType = KdfType;
kdfOptions: any[] = [];
formPromise: Promise<any>;
recommendedPBKDF2Iterations = DEFAULT_PBKDF2_ITERATIONS;
Expand Down